This article is intended for Advertisers who would like to post to Mixpanel for every new attribution recorded on the AppsFlyer platform.
Mixpanel is a product analytics platform that enables everyone to learn from and act on their data. With the power to record every user action and easily query and visualize answers, Mixpanel gives product leaders the insight they need to build products people love.
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 3rd parties. AppsFlyer cannot share user level data of users acquired through these media sources with 3rd party platforms or services. All installs from such media sources are therefore sent as organic.
For more details and a list of media sources that restrict sharing data with 3rd parties, click here.
Setting up mixpanel
Go to the dashboard of your app and click on Integrated Partners on the left bar.
Enter "Mixpanel" in the search field and click on its logo to open the Mixpanel configuration window.
The Mixpanel configuration window only makes use of the Integration tab.
For a detailed description of the Partner Configuration Window Header, click here.
The Integration Tab is divided into different sections as described below.
On the first visit here, you will need to toggle
below. ON the Activate Partner button to enable
setup of the integration tab's parameters. The toggle MUST be ON
for as long as you work with the partner.
For more details about partner activation please click here.
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 or follow the steps below.
Configuring AppsFlyer and mixpanel
- Get the Token parameter from Mixpanel:
- Login to your Mixpanel account at: https://mixpanel.com/login/
- Select Account in the upper menu
- Select Projects– on this page you can find the token parameter
- 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 unchecked
- If you are not using AppsFlyer customer_user_id - check Send Advertiser ID and the device ID is sent to Mixpanel as the customer_user_id (unique_id in Mixpanel) refer to the AppsFlyer SDK integration guide for Android and iOS.
- Select Events if you want to send the data to Mixpanel Events end point
- Select People if want to send the data to Mixpanel People end point
- Select Advanced Data Sharing to send additional information to Mixpanel: cost, cost_value, c (campaign), network (pid), impression_based (is-impression).
- Click Save.
AppsFlyer can send automatic user installs postbacks to Mixpanel. Use this section to define sending these postbacks.
Select Events attributed to any partner or organic to send to Mixpanel postbacks for any user that installs the app. Post-install in-app events can't be automatically sent from AppsFlyer to Mixpanel.
Once you have saved the configuration, 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 Mixpanel.
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("email@example.com", <CUSTOMER_USER_ID> OR <GAID>);
Mixpanel iOS Objective C - Combining anonymous and identifiable user data
[mixpanel createAlias:@"firstname.lastname@example.org" forDistinctID:<CUSTOMER_USER_ID> OR <IDFA>];
Mixpanel iOS Swift - Combining anonymous and identifiable user data
mixpanel.createAlias("email@example.com", 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("firstname.lastname@example.org");
- 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.