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. AppsFlyer doesn't share user-level data of users acquired through these media sources with third-party platforms or services. Installs from these media sources are sent as organic.
Setting up Mixpanel
To activate the integration with Mixpanel:
- In AppsFlyer, go to Configuration > Integrated Partners.
- Select Mixpanel.
- In the Integration tab, enable Activate partner.
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: Enable this if you want to send the data to Mixpanel Events endpoint.
- People: Enable this you want to send the data to Mixpanel People endpoint.
- Advanced Data Sharing: Enable this to send additional information to Mixpanel: cost, cost_value, c (campaign), network (pid), impression_based (is-impression).
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
example.com”); MixpanelAPI mixpanel = MixpanelAPI.getInstance(context, MIXPANEL_TOKEN); // Ensure all future events sent from the device will have the distinct_id 13793 mixpanel.identify("13793"); // Ensure all future user profile properties sent from the device will have the distinct_id 13793 mixpanel.getPeople().identify("13793");
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.