Mixpanel integration with AppsFlyer

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:

  1. In Appsflyer, go to Configuration > Integrated Partners.
  2. Select Mixpanel. 
  3. In the Integration tab, enable Activate partner

Learn more about the partner configuration window header.

Integration tab

The Integration Tab is divided into different sections as described below.

General settings

Mixpanel_msc_new_3.png

  • *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:

    1. Login to your Mixpanel account at: https://mixpanel.com/login/
    2. In Mixpanel, go to the Analysis dashboard and click the gear icon.

      mixpanel-token-1.png

    3. Copy your token from the Access Keys section of your project and paste it in the token field in AppsFlyer Mixpanel integration tab.

      mixpanel-token-2.png

  • 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 end point.
  • People: Enable this you want to send the data to Mixpanel People end point.
  • Advanced Data Sharing: Enable this to send additional information to Mixpanel: cost, cost_value, c (campaign), network (pid), impression_based (is-impression).

Default postbacks

AppsFlyer can send automatic user installs postbacks to Mixpanel. Use this section to define sending these postbacks.

mixpanel-default-postbacks.png

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

mixpanel-in-app-events-settings.png

In this section, you map AppsFlyer events with Mixpanel via postbacks. The only event that can be sent to Mixpanel is af_uninstall.
Learn more about in-app event postbacks.

To configure in-app events postbacks: 

  1. Enter the Mixpanel token.
  2. Enable In-app event postback.
  3. To send the Advertiser ID of the uninstall, enable Send Advertiser ID.
  4. To send additional information for the uninstall, enable Advanced Data Sharing.
  5. Click Add Event to add an SDK Event to the list.
  6. Select af_uninstall from the dropdown menu.
  7. Select the corresponding Partner Event Identifier from the dropdown menu.
  8. 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).
  9. 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

Attribution Links are not available for this partner.
 

Cost 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 tab

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:

  1. App has been launched (opened) by the user.
  2. Collect the device IDFA / Advertising ID of the device and set it as the Customer User ID, using the SDK function setCustomerUserId.
  3. Send Track App Launch. This API enables AppsFlyer to detect installations, sessions and updates.
  4. After installation is attributed, an install event is sent to Mixpanel with the customer_user_id
  5. User Registration occurs, as set by your own requirements.
  6. User Registration completes, as set by your own requirements.
  7. 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.

    AndroidObjective CSwiftUnity

    Mixpanel Android - Combining anonymous and identifiable user data

    mixpanel.alias("user@example.com", <CUSTOMER_USER_ID> OR <GAID>);
    
  8. Mixpanel receives the customer_user_id from AppsFlyer with the alias of the User ID (e.g email address)

 Note

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.

Was this article helpful?