Advanced Audience Targeting is currently in beta. Apply on the Optimizely beta signup page or contact your Customer Success Manager.
If you are not familiar with targeted deliveries and experiments in Optimizely Feature Experimentation, it is recommended you follow the Quickstart guide for your specific SDK first before following this document.
You may need to upgrade your SDK to the latest version in order to use advanced audience targeting. Refer to the SDK compatabililty matrix to view the newest version available for your SDK.
The first step is to install and initialize the Optimizely Feature Experimentation SDK in your application. When initializing the SDK, you should enable the Optimizely Data Platform (ODP) audience segmentation. See the Customize configuration section for information on
ODPManager customization options.
Refer to the following documentation for your SDK:
- Optimizely Agent
OptimizelyUserContextcan only be created after the SDK instance is ready (the datafile has been fetched).
After you have installed and initialized the Optimizely client, you need to create an
OptimizelyUserContext object with your Optimizely Feature Experimentation userID and additional attributes. The
OptimizelyUserContext object lets you make flag decisions and track events for a user context that you have already created using the
OptimizelyUserContextis created, the SDK automatically sends an identify request to ODP.
fetchQualifiedSegments() and then
isQualifiedFor() on the
OptimizelyUserContext object to first fetch the ODP segments for the specific userID or any time you need to check if the user context is qualified for a given ODP real-time segment. Refer to your chosen SDK's documentation on
OptimizelyUserContext for details and code samples:
You can use the standard Decide methods enriched with Advanced Audience Targeting to return flag decisions for a user. The flag decision includes flag-enabled or disabled status and flag variation. When an ODP-type audience condition is required for the decision, the SDK can look up the ODP segments in the current user context saved when
fetchQualifiedSegments() is called. Refer to your specific SDK's documentation on calling the these methods:
- Optimizely Agent
You can call
sendOdpEvent() on the
OptimizelyClient to send arbitrary event data to ODP. Refer to your preferred SDK to learn more:
You can customize the
OdpManager or override the entire
ODPManager with a custom one. But each Optimizely SDK has its own way of implementing it. Refer to your desired SDK to learn more:
Updated 18 days ago