HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Configure Mixpanel

Integrate Optimizely Web with Mixpanel to read data from and see reporting on Optimizely Web experiments in Mixpanel.

If you use Mixpanel to monitor your site’s traffic, you can view Optimizely 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 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 -- you don't have to place the Optimizely snippet first. Alternatively, you can install the Mixpanel SDK onto your application. 

View Optimizely data in Mixpanel

In order to enable Mixpanel for your Optizemly experiment, you must enable it for your project and then add it to your specific experiment. Instructions on how to do so follow.

Steps to enable Mixpanel for the entire project:

  1. In Settings on the Optimizely App, click the Integrations tab. 
  2. Select Mixpanel from the list of Integrations.
  3. Enable Mixpanel by toggling it On.
  4. Select Accept on the Turn on Integration window.
  5. Optionally, check Enable the Mixpanel integration by default for all new experiments
  6. Select Save to complete the process.

Steps to enable Mixpanel for an individual experiment:

  1. In the Campaign or Experiment Overview, click the Integrations tab.
  2. Enable the Mixpanel integration for the campaign/experiment by toggling on the checkbox labeled Tracked.
  3. Click Save.
  4. Publish the campaign/experiment to start tracking with Mixpanel.

📘

Note

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 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,  
}

📘

Note

'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 is 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 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.