This article is about Optimizely Classic Mobile. If you're using Optimizely X, check out this article instead.
 
RELEVANT PRODUCTS:
  • Optimizely Classic Mobile 

This article will help you:
  • Integrate Mixpanel to read data from Optimizely (iOS and Android)
  • See reporting on Optimizely experiments in Mixpanel

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 Mixpanel integration, click the Integrations tab on the Home page. Choose Mixpanel and toggle the button to On in the right sidebar.

 

Within the Settings in the right sidebar, to enable Mixpanel for all experiments, check the checkbox and click Save.

 Your Optimizely experiment must be running for this integration to work.

Set up Mixpanel for Android

When you're setting up Mixpanel for mobile experiments, you don't have to enable the integration separately for each experiment.

  1. Install the Optimizely SDK.

  2. Install the Mixpanel SDK.

  3. Add Gradle dependency for the Mixpanel plugin:

    dependencies {
        compile('com.optimizely:mixpanelintegration:+@aar')
    }
  4. Start Optimizely after the Mixpanel API is instantiated:

    MixpanelAPI mixpanelAPI = MixpanelAPI.getInstance(this, "API_TOKEN");
    Optimizely.startOptimizelyWithAPIToken("<API Token>", getApplication());

Set up Mixpanel for iOS

  1. Install the Optimizely SDK.

  2. Install the Mixpanel SDK.

For versions of Optimizely's iOS SDK 1.4 and above, to enable this integration, click the Integrations tab on the Home page. Choose Mixpanel and toggle the button to On in the right sidebar:



For versions of Optimizely's iOS SDK 1.3.2 and below, call activateMixpanelIntegration after startOptimizelyWithAPIToken:

[Optimizely startOptimizelyWithAPIToken:@"abcdefg~12345" launchOptions:launchOptions];
[Optimizely activateMixpanelIntegration];