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

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Integrate Mixpanel

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

📘

Note

See Optimizely's Third-Party Add-Ons & Platform Integration Terms.

If you use Mixpanel to monitor your site’s traffic, you can view Optimizely experiment or campaign results with the rest of the data you collect. The integration lets you see in Mixpanel how your Optimizely experiments or campaigns affect users' interactions with your site or app.

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

Here are a few more benefits:

  • 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 were not.

Set up the integration

The Mixpanel JavaScript snippet must be installed on the pages of your site to track visitor behaviors as events. You can arrange the Optimizely and Mixpanel snippets in any order.

Alternatively, you can install the Mixpanel SDK onto your application. 

View Optimizely data in Mixpanel

You must enable Mixpanel for your project and then add it to your experiment.

Project level

  1. Go to Settings > Integrations > Mixpanel in Optimizely.
  2. Enable Mixpanel by toggling it On.
  3. Select Accept.
  4. (Optional) Check Enable the Mixpanel integration by default for all new experiments.
  5. Click Save.

Experiment or campaign level

  1. Go to Integrations in your experiment or campaign.
  2. Enable the Mixpanel integration for the campaign/experiment by selecting 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 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,  
}

📘

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 was 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:

Troubleshoot issues

I am not seeing any Optimizely data in Mixpanel.

Your Optimizely campaign or experiment must be running for the Mixpanel integration to work. Use theMixpanel Log or Mixpanel Tools Chrome extensions to confirm whether the Optimizely decision event is being sent when your experiment is loaded.