At a glance: Learn how to automatically share data from AppsFlyer to Mixpanel, a product analytics platform.
The integration between AppsFlyer and Mixpanel enables you to import the Acquisition Campaign information from AppsFlyer to Mixpanel.
Some media sources restrict sharing data with third parties. Therefore, postbacks for restricted events won't be sent to this partner, regardless of the configured selection for sending postbacks.
Setting up Mixpanel
The setup is done from the Active Integrations page, but to find the partner you must first go to the marketplace.
Before setting up an integration, make sure you contact the partner and open an account with them.
To activate the integration:
- From the top menu of any AppsFlyer page, click Marketplace.
- Search for the partner and select it.
- Click Set up integration. You’re directed to the integration setup page.
- In the Integration tab, select the app for the integration and turn Activate partner on.
Note: The toggle must be on (activated) for as long as you work with the partner.
- Complete the configuration using the relevant tabs, as described below.
Learn more about the partner configuration window header.
The Integration tab is divided into different sections as described below.
EU Data Residency: AppsFlyer send data to Mixpanel's US servers as a default. To send data to Mixpanel's EU servers instead, turn this toggle on.
*token: Mixpanel connects with AppsFlyer via a unique Token. If you don't already have it, you must obtain it from Mixpanel to continue with the integration.
To get the Token from Mixpanel:
- Login to your Mixpanel account at: https://mixpanel.com/login/
- In Mixpanel, go to the Analysis dashboard and click the gear icon.
- Copy your token from the Access Keys section of your project and paste it in the token field in AppsFlyer Mixpanel integration tab.
Send Advertiser ID:
- If you are using AppsFlyer customer_user_id parameter then it is sent to Mixpanel with every install (Leave Send Advertiser ID disabled).
- If you are not using AppsFlyer customer_user_id - enable Send Advertiser ID. The device ID is sent to Mixpanel as the customer_user_id (unique_id in Mixpanel).
Learn more about the AppsFlyer SDK integration guide for Android and iOS.
- Events: Turn on to send install data to the Mixpanel Events endpoint.
People: Turn on this to send install data to the Mixpanel People endpoint.
For install postbacks to be sent to Mixpanel, at least one of the two endpoints, Events or People, must be turned on.
- Advanced Data Sharing: Enable this to send additional information to Mixpanel: c (campaign), network (pid), impression_based (is-impression).
- EU Data Residency: AppsFlyer send data to Mixpanel's US servers as a default. To send data to Mixpanel's EU servers instead, turn this toggle on.
AppsFlyer can send automatic user installs postbacks to Mixpanel. Use this section to define sending these postbacks.
AppsFlyer can send automatic postbacks to Mixpanel following user installs. Use this section to define the source of the users that the postbacks are sent to for each event. Learn more about default postbacks.
To send postbacks for any user that downloads the app to Mixpanel, select All media sources, including organic.
In-app events settings
In this section, you map AppsFlyer events with Mixpanel via postbacks.
Mixpanel captures in-app events using their own SDK. The only event that can be sent to Mixpanel that is not captured by them is af_uninstall.
Learn more about in-app event postbacks.
To configure in-app events postbacks:
- Enter the Mixpanel token.
- Enable In-app event postback.
- To send the Advertiser ID of the uninstall, enable Send Advertiser ID.
- To send additional information for the uninstall, enable Advanced Data Sharing.
- Click Add Event to add an SDK Event to the list.
- Select af_uninstall from the dropdown menu.
- Select the corresponding Partner Event Identifier from the dropdown menu.
- Select the required option from the Send revenue dropdown menu:
- No values & no revenue: sends only the event itself without the event value.
- Values & no revenue: sends all the parameters excluding the revenue value.
- Values & revenue: sends all the event parameters, including the revenue value (if exists in the event).
- To complete the integration configuration, click Save Integration.
Once you have saved the integration, AppsFlyer sends the following data to Mixpanel for every organic and non-organic install:
- Mixpanel token parameter
- Customer_user_id or Device ID (IDFA / Google Advertising ID)
- Media Source
- Campaign name
Note: CUID isn't sent in uninstall postbacks.
Attribution link tab
Attribution Links are not available for this partner.
Cost data is not supported in the integration with this partner.
Ad revenue tab
Ad Revenue is not supported in the integration with this partner.
Permissions are not available for this partner.
Integrating with Mixpanel when using a login mechanism
The following shows an example of the integration steps:
- App has been launched (opened) by the user.
- The Mixpanel SDK generates a random distinct ID (distinct_id).
- Get the Mixpanel distinct ID, and set it as the Customer user ID, using the Appsflyer SDK function setCustomerUserId.
- Send Start. This API enables AppsFlyer to detect installations, sessions, and updates.
- After the app installation is attributed, an install event is sent to Mixpanel with the Customer user ID, which includes the Mixpanel distinct ID.
When the user registers or logs in, the Mixpanel identify() command is called with the user identifier (for example, email or customer ID). This will map the initial random distinct ID to the registered user ID.
Mixpanel Android - Combining anonymous and identifiable user data
MixpanelAPI mixpanel = MixpanelAPI.getInstance(context, MIXPANEL_TOKEN); mixpanel.identify("firstname.lastname@example.org"); // Mixpanel v6.2.0 and below should use the following API: mixpanel.getPeople().identify(“user@
Mixpanel iOS Objective C - Combining anonymous and identifiable user data
Mixpanel iOS Swift - Combining anonymous and identifiable user data
- Mixpanel receives the customer_user_id from AppsFlyer with the alias of the User ID (for example, email address).
If you are not using any registration process inside your application, implement steps 1-3 as described above.
Viewing AppsFlyer data in Mixpanel
The screenshots below are a Funnel report to see the conversion from install through the value event, broken down by the Media Source. Additionally, the time to convert for each Media Source can be seen.