Optimizely will be sunsetting Full Stack Experimentation on July 29, 2024. See the recommended Feature Experimentation migration timeline and documentation.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySumbit a ticketLog In
GitHubNuGetDev CommunitySumbit a ticket

Integrate analytics platforms

This topic describes how to integrate third-party analytics platforms with Optimizely Full Stack.

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

Although Optimizely 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 certain actions are triggered in the SDK.

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

To track feature usage:

  1. Sign up for an analytics provider of your choice (for example, Segment)
  2. Set up a notification listener.
  3. Follow your analytics provider's documentation and send events from within the listener callback.

For more information about notification listeners, see the SDK reference guide for your language, and see Notification listeners.

In this section, we suggest implementations for some common analytics platforms. Use these suggestions as presented or adapt them to meet your specific needs.

Analytics

Analytics integrations let you filter your third-party data by Optimizely experiment and variation. This enables you to measure Optimizely experiment performance based on events that are tracked by the third party. 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 setting up your integration. When a user activates an experiment, you need to notify your third-party analytics service 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 Full Stack, you will need to notify your third-party analytics platform when a user sees an experiment, which is when you use Activate. Development teams can make use of our notification listeners to bind this functionality to our client’s Activate and Is Feature Enabled methods.

📘

Note

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

Audiences

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

You can target your experiment to users by values for the attributes that you've set up in your Optimizely project. Add the audience attributes that you'll target to your project before passing them to Optimizely in your code. For more information, see Define attributes.

After you create the attributes within Optimizely, you can pass your DMP's attributes to our Activate, Track, and Get Feature Variable methods under the attributes argument. We don’t currently offer integrations to handle this audience targeting automatically.

Notification listeners

For more information about notification listeners, see the SDK reference guide for your language, and see Notification listeners.