The Mixpanel integration is a bi-directional integration which enables the automatic tracking of events from Mixpanel to Taplytics and provides the ability to push Experiment and Feature Flag data from Taplytics back into Mixpanel.

Newly added is now the capability to Export Cohorts that you’ve created on Mixpanel to Taplytics! See the Mixpanel Cohort Export section for more information.


Mixpanel to Taplytics

🚧

Supported Versions

The Mixpanel to Taplytics automatic event integration is supported on

  • Mixpanel Android versions below 5
  • Mixpanel Obj-C

The Mixpanel integration allows you to leverage the same client-side events being sent from your App for Goal Creation on the Taplytics platform. These events will automatically flow into Taplytics and will be visible in the Code Event dropdown. For more information on goal creation, please see here.

571

Taplytics to Mixpanel

The Taplytics SDK can automatically push Experiment and Feature Flag data back to your Mixpanel instance so that you may continue reporting on your desired analytics platform.

To enable this feature, turn on the Mixpanel toggle in the Push Experiments to Analytics Sources section located at the bottom of the Settings page.

1166

Android

On version 2.10.1 or above of the Taplytics Android SDK, Taplytics will send experiment/variation data to the Mixpanel Android SDK as a super property called TL_Experiments. The super property will contain an array of strings in the format:

["Experiment 1:Variation3", "Experiment 2:Variation 9", ...]

For SDK version 2.10.0 and below, Taplytics logs experiment/variation events to the Mixpanel Android SDK as follows:

HashMap<String, String> experimentsAndVariations = new HashMap<>();
experimentsAndVariations.put("Experiment 1", "Variation 1");
experimentsAndVariations.put("Experiment 2", "Variation 3");

mixpanel.registerSuperProperties("TL_Experiments", experimentsAndVariations)

iOS - Objective-C

On version 3.3.0 or above of the Taplytics iOS SDK, Taplytics will send experiment/variation data to the Mixpanel Obj-C SDK as a super property called TL_Experiments. The super property will contain an array of strings with the format:

["Experiment 1:Variation3", "Experiment 2:Variation 9", ...]

For SDK version 3.2.0 and below, Taplytics tracks experiment/variation events to the Mixpanel Obj-C SDK as follows:

NSDictionary* experimentsAndVariations = @{
    @"Experiment 1": @"Variation 1",
    @"Experiment 2": @"baseline"
};
[[Mixpanel sharedInstance] track:@"TL_experiments" properties:experimentsAndVariations];
[[Mixpanel sharedInstance] registerSuperProperties:experimentsAndVariations];
let experimentsAndVariations = [
    "Experiment 1": "Variation 1",
    "Experiment 2": "baseline"
]
Mixpanel.sharedInstance().track("TL_experiments", properties: experimentsAndVariations)
Mixpanel.sharedInstance().registerSuperProperties(experimentsAndVariations)

iOS - Swift

To send Taplytics experiment data back to Mixpanel, you may add the following snippet to set TL_experiments as a super property. Note that you may also modify the format of TL_experiments yourself but the following is an example of how the Android and Obj-C integrations are implemented.

Taplytics.getRunningExperimentsAndVariations { experiments in
	var dic = ["TL_Experiments": []]
	var arr = [String]()

	for (name, variation) in experiments {
		let experimentString = String(format: "%@:%@", name, variation)
		arr.append(experimentString)
	}

	dic["TL_Experiments"] = arr
	Mixpanel.mainInstance().registerSuperProperties(dic)
}

The super property will contain an array of strings in the following format.

["Experiment 1:Variation3", "Experiment 2:Variation 9", ...]

JavaScript

The Taplytics JS SDK will send experiment/variation data to the Mixpanel JS SDK as a super property called TL_Experiments. The super property will contain an array of strings with the format:

"TL_Experiments": ["Experiment 1:baseline", "Experiment 2:Variation 2"]

Note: Make sure that Mixpanel is initialized before Taplytics.

Example - Super Properties

Below is an example of the TL_Experiments array set as a property of the Mixpanel Test event.

1359

Mixpanel Cohort Export

The Taplytics integration provides users with the ability to import Mixpanel User Cohorts straight from the Mixpanel dashboard. This allows users to easily target Audiences to segment Feature Flags, Pushes and Experiments to and also run analysis on.

Connecting the Taplytics Integration

To get setup with the Mixpanel-Taplytics integration, you'll need to be able to grab the Taplytics API Key from your Taplytics project. You can find that by navigating to the Settings page within your Taplytics project. The API Key will be needed in a later step.

1558
  1. Enter your Mixpanel dashboard and head over to the Integrations tab within Data Management.

  2. Find and select the Taplytics Integration and click on Connect

1511
  1. An API Key is required at this step. Enter the Taplytics API Key into the window and hit Continue.
530

That's it! Move on to the next section to learn how to Export Mixpanel cohorts to Taplytics.

Exporting Cohorts

  1. Navigate to the Cohorts page within Data Management

  2. Click on the three dots next to the Cohort that needs to be Exported to bring up a list of other options. Click on Export to: Taplytics.

1512
  1. Here, you are given an option to setup a recurring Dynamic sync or a One-time sync. Selecting Dynamic sync will automatically run every 2 hours and update your Audience on Taplytics.

  2. Once you've selected one of the above, click on Begin Sync and your Cohort will be exported to Taplytics. That's it!


Taplytics Segmentation

If you have exported Mixpanel Cohorts into Taplytics, then you'll be able to leverage those Audiences for segmentation within the Taplytics platform.

  1. In an Experiment, Feature Flag or Push, navigate to the Distribution tab or section.

  2. Select the Audience icon to switch Audiences

1174
  1. Select Mixpanel Cohort
1175
  1. Choose the Cohort that you've imported from the dropdown
1174

That's it! Complete the rest of your Experiment, Feature Flag or Push and your Audience will be live!