RELEVANT PRODUCTS:
  • Optimizely X Web Experimentation
  • Optimizely X Web Personalization
  • Optimizely X Web Recommendations

This article will help you:
  • Integrate Mixpanel to read data from Optimizely
  • See reporting on Optimizely experiments in Mixpanel

If you use Mixpanel to monitor your site’s traffic, you can view Optimizely X experiment results alongside the rest of the data you collect through Mixpanel. The integration allows you to see how your Optimizely experiments affect how users interact with your site or app in Mixpanel.

Optimizely automatically populates a Mixpanel super property that includes campaign or experiment bucketing information for all events triggered for visitors. Then, Optimizely sends a decision event to Mixpanel to ensure that all visitors are tracked.

Here are a few more reasons to set up this integration:

  • Get a direct view of how Optimizely experiments affect the metrics you track in Mixpanel.

  • See Mixpanel data for each variation in your experiment (or experience in your campaign).

  • Filter Mixpanel reporting to include visitors who were successfully included in an Optimizely experiment and exclude visitors who weren't.

Mixpanel integration is available for any Optimizely X plan.

Set up the integration

The Mixpanel JavaScript snippet must be installed on the pages of your site where you'd like to track visitor behaviors as events. You can arrange the Optimizely and MIxpanel snippets in any order -- unlike in Optimizely Classic, you don't have to place the Optimizely snippet first.

  1. Ensure that the MIxpanel snippet is installed on your site. 

  2. Enable the integration in Optimizely.

    You can toggle on the integration for your entire project or for an individual experiment.

View Optimizely data in Mixpanel

  1. Enable the integration for a single campaign or experiment.

  2. In the Campaign or Experiment Overview, click the Integrations tab.

  3. Enable the Mixpanel integration for the campaign/experiment by toggling on the checkbox labeled ‘Tracked.'

  4. Publish the campaign/experiment to start tracking with Mixpanel.

    Your Optimizely experiment or campaign must be running for the Mixpanel integration to work.

After you start your campaign or experiment, you can expect the data to be available to Mixpanel within minutes.

You can segment your existing funnels and metrics by your Optimizely campaigns and experiments and format the Optimizely super property as follows:

For a Personalization Campaign

{

      '<campaign_name> (<campaign_id>)': '<experience_name> (<experience_id>)',

      '<experience_name> (<experience_id>)': '<variation_name> (<variation_id>)',

      'HB [<campaign_name> (<campaign_id>)]': false,

}

'HB' means holdback. This property signifies whether a visitor was kept in the campaign holdback.

For an A/B Test

{

      '<experiment_name> (<experiment_id>)': '<variation_name> (<variation_id>)'

}

After Optimizely sets the super property, it sends an event to mark that a campaign or experiment decision has been made. This event is formatted like this:

For a Personalization Campaign

Campaign Decided: <campaign_name> (<campaign_id>)

For an A/B Test

Experiment Decided: <experiment_name> (<experiment_id>)

Here's an example of using Mixpanel to evaluate how two different variations in an experiment affect a funnel:

Troubleshooting

I'm not seeing any Optimizely data in Mixpanel. What's going on?

Your Optimizely X campaign or experiment must be running for Mixpanel integration to work. Use the Mixpanel debugger Chrome extension to confirm whether the Optimizely decision event is being sent when your experiment is loaded.