Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Configure analytics platforms

Track analytics on feature flag usage by using a notification listener to send events to the analytics provider of your choice.

📘

Note

These are third-party integrations and not Optimizely subprocessors. See Optimizely's Third-Party Add-Ons & Platform Integration Terms.

When you create flags, you want to know when users are accessing a feature flag and what experience they receive in production.

Although Optimizely Feature Experimentation does not offer analytics on feature flags out of the box, you can still track analytics on feature flag usage by adding a notification listener to send events to the analytics provider of your choice.

Notification listeners trigger a callback function that you define when specific actions are activated in the SDK.

The most common use case is sending a stream of all feature flag decisions to an analytics provider or an internal data warehouse to join it with other data you have about your users.

To track flag usage complete the following steps:

  1. Configure an analytics provider of your choice.
  2. Configure a notification listener.
  3. Follow your analytics provider's documentation and send events from within the listener callback.

📘

Note

The experiment ID and variation IDs generated by Optimizely are 16-digit numbers. This can potentially cause issues with analytics integrations that might misinterpret these IDs as credit card numbers, resulting in data being flagged or removed.

To prevent this, consider incorporating a letter prefix or using a combination of name and ID (for example expID(expName) or varID(varName)) in your integration configuration. Adjustments may be necessary for custom integrations to ensure data is captured correctly

The following sections are suggested implementations for some common analytics platforms. Use these suggestions as presented or adapt them to meet your specific needs.

Analytics integrations

Analytics integrations let you filter your third-party data by Optimizely Feature Experimentation experiments and variations. This enables you to measure Feature Experimentation experiment performance based on events that the third party tracks. Analytics integrations also let you create custom third-party reports that include only users who saw a particular experiment.

Analytics integrations are conceptually simple, but there are some important considerations in configuring your integration. When a user activates an experiment, you need to notify your third-party analytics service about which experiment and variation the user saw.

Generally, each third-party analytics platform has its own event format for this notification. For example, Segment's Experiment Viewed event has expected properties that contain your experiment and variation. With Google Analytics, you can use a non-interaction event with a custom dimension that contains your experiment and variation. Check your third-party analytics platform's documentation to confirm how they expect you to send this information.

For Optimizely Feature Experimentation, you need to notify your third-party analytics platform when a user sees an experiment, which is when you use the Decide method. You can make use of the notification listeners to bind this functionality to the client’s Decide method.

📘

Note

If you already implemented an integration but are questioning the data or want to know what third-party data Optimizely Feature Experimentation will support, read about data discrepancies in third-party data.

Audiences

Audience integrations help you target your Optimizely Feature Experimentation experiments to segments of users that are identified in a third-party data management platform (DMP).

You can target your experiment to users by values for the attributes you have configured in your Optimizely Feature Experimentation project. Add the audience attributes you want to target to your project before passing them to Feature Experimentation in your code. For information, see Define attributes.

After you create the attributes within Optimizely Feature Experimentation, you can pass your DMP's attributes when you build the OptimizelyUserContext object.

Documentation

The following sections include links for each Feature Experimentation SDK to help you configure your integrations.

Decide methods

Notification listeners

OptimizelyUserContext