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
Attribution link tab
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
Some apps are using a login mechanism and will generate a user ID only after a login event. In these cases you should use Mixpanel Alias function as seen in the following example:
- App has been launched (opened) by the user.
- Collect the device IDFA / Advertising ID of the device and set it as the Customer User ID, using the SDK function setCustomerUserId.
- Send Track App Launch. This API enables AppsFlyer to detect installations, sessions and updates.
- After installation is attributed, an install event is sent to Mixpanel with the customer_user_id
- User Registration occurs, as set by your own requirements.
- User Registration completes, as set by your own requirements.
- If you are using your internal User ID as Mixpanel ID, set the customer_user_id (or the device id – see section 2) as the distinct ID and and the User ID (e.g email address) as mixpanel alias.
Mixpanel Android - Combining anonymous and identifiable user data
mixpanel.alias("firstname.lastname@example.org", <CUSTOMER_USER_ID> OR <GAID>);
Mixpanel iOS Objective C - Combining anonymous and identifiable user data
[mixpanel createAlias:@"email@example.com" forDistinctID:<CUSTOMER_USER_ID> OR <IDFA>];
Mixpanel iOS Swift - Combining anonymous and identifiable user data
mixpanel.createAlias("firstname.lastname@example.org", distinctId: <CUSTOMER_USER_ID> OR <IDFA>);
Mixpanel Unity - Combining anonymous and identifiable user data
// set customer user id or device id Mixpanel.Identify(<CUSTOMER_USER_ID> OR <IDFA>); // set the alias Mixpanel.Alias("email@example.com");
- Mixpanel receives the customer_user_id from AppsFlyer with the alias of the User ID (e.g email address)
If you are not using any registration process inside your application, implement sections 1-3.
Viewing AppsFlyer data in Mixpanel
The screenshots below are a Funnel report selecting a specific Attribution Analytics partner and segmenting by Attribution Analytics offer.