Integrating Optimizely with Mixpanel (Web, iOS, and Android)

Last updated:

This article will help you:

  • Integrate Mixpanel to read data from Optimizely
  • See reporting on Optimizely experiments in Mixpanel
  • Implement Mixpanel on web or mobile (iOS and Android)
Mixpanel users can include Optimizely experiment and variation names directly into Mixpanel reports. Optimizely will automatically populate a Mixpanel super property to all events triggered for that user. 
To enable this integration, go to the Integrations tab on the Home page. Select Mixpanel and toggle the button to On in the right sidebar.
Within the Settings in the right sidebar, you can enable Mixpanel for all experiments by checking the checkbox, then clicking Save.

Make sure that your Optimizely experiment is running for this integration to work.

Integrate Mixpanel for the Web



To set up integration with Mixpanel, add the Mixpanel JavaScript snippet AFTER the Optimizely snippet on your page. This will allow Optimizely to properly set the Mixpanel super properties before any Mixpanel events are sent. 

  1. To enable Mixpanel integration for an individual experiment within the Editor, click Options > Integrations.

  2. Now, go to the Mixpanel section and check the box.

  3. Now you can segment your existing funnels and metrics by your Optimizely experiments. The name of the property is the name of the experiment prefixed with "Optimizely" and the values are your variation names. (i.e. "Optimizely {{Experiment Name}}": "{{Variation Name}}")

  4. Once you start your experiment, the data should be available to Mixpanel within minutes. Below is an an example of using Mixpanel to evaluate the funnel performance of two distinct variations.

Integrate Mixpanel for Mobile (Android and iOS)

Mixpanel setup for mobile experiments is similar to the process for Web, but you will not have to enable the integration separately for each experiment.

To set up Mixpanel, simply do the following:


  1. Install the Optimizely SDK
  2. Install the Mixpanel SDK
  3. Add Gradle dependency for the Mixpanel plugin:
    dependencies {
  4. Start Optimizely after the Mixpanel API is instantiated:
    MixpanelAPI mixpanelAPI = MixpanelAPI.getInstance(this, "API_TOKEN");
    Optimizely.startOptimizelyWithAPIToken("<API Token>", getApplication());


  1. Install the Optimizely SDK
  2. Install the Mixpanel SDK
  3. Call activateMixpanelIntegration after startOptimizelyWithAPIToken:
    [Optimizely startOptimizelyWithAPIToken:@"abcdefg~12345" launchOptions:launchOptions];
    [Optimizely activateMixpanelIntegration];