Solved

Mixpanel do not receive event Install from AppsFlyer

  • 15 June 2020
  • 4 replies
  • 241 views

I contacted the AppsFlyer, they told me, the event “install” is send success (response code is 200), but I don not see at Mixpanel

 

It only happens on Android phones, iOS phones is good

icon

Best answer by cherise 15 August 2020, 08:31

Hi @Parry —

 

I noticed you got this answer resolved from support, but for anyone else stumbling into the same issue here is an update:

 

It's often that the issue isn't that Mixpanel is not receiving the events, but the Android events are not being sent to the same distinct_id that Mixpanel is sending it's events to. Here's what I found on AppsFlyer:

  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.


AppsFlyer sends HTTP track requests to your Mixpanel project to track this "install" event. They send this track call with the distinct_id as the device IDFA / Advertising ID of the device, and  they create people profiles for those users as well. 


Now let's look at the Android library and how Mixpanel generates distinct_ids for Android
 

The Android library automatically creates a random unique UUID (variant 2, version 4 from RFC 4122) value for distinct_id.

 

Since the Android library uses a native object to store the distinct_id value, it will persist across sessions and app updates. Post version 3.0, when a user removes and then re-installs the app, they will get a new distinct_id value.


This is different from the distinct_id that AppsFlyer uses.

So why does this integrate with iOS perfectly? The key here is that, for iOS the IFA is used as the distinct_id

For iOS users, if our library detects that the application is using the AdSupport.framework, we'll use the IFA (ID for Advertisers).


It seems to me that AppsFlyer almost relies on you setting up an alias for Android for the integration to integrate properly into one profile (I also feel like this should be highlighted in their documentation a bit stronger). For the steps the make it seem like you only need to set up an alias if you're using an internal user ID; however, the integration doesn't actually work out of the box without setting up an alias with Android.
 

  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.


Now for a solution. The only way you can get continuity in your profiles is to set up ID merge, identify the IDs that need to be merged and merge those IDs into a single ID cluster. This will streamline all events onto one user's activity feed.
 

View original

4 replies

Userlevel 5
Badge +3

Hi @Parry —

 

I noticed you got this answer resolved from support, but for anyone else stumbling into the same issue here is an update:

 

It's often that the issue isn't that Mixpanel is not receiving the events, but the Android events are not being sent to the same distinct_id that Mixpanel is sending it's events to. Here's what I found on AppsFlyer:

  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.


AppsFlyer sends HTTP track requests to your Mixpanel project to track this "install" event. They send this track call with the distinct_id as the device IDFA / Advertising ID of the device, and  they create people profiles for those users as well. 


Now let's look at the Android library and how Mixpanel generates distinct_ids for Android
 

The Android library automatically creates a random unique UUID (variant 2, version 4 from RFC 4122) value for distinct_id.

 

Since the Android library uses a native object to store the distinct_id value, it will persist across sessions and app updates. Post version 3.0, when a user removes and then re-installs the app, they will get a new distinct_id value.


This is different from the distinct_id that AppsFlyer uses.

So why does this integrate with iOS perfectly? The key here is that, for iOS the IFA is used as the distinct_id

For iOS users, if our library detects that the application is using the AdSupport.framework, we'll use the IFA (ID for Advertisers).


It seems to me that AppsFlyer almost relies on you setting up an alias for Android for the integration to integrate properly into one profile (I also feel like this should be highlighted in their documentation a bit stronger). For the steps the make it seem like you only need to set up an alias if you're using an internal user ID; however, the integration doesn't actually work out of the box without setting up an alias with Android.
 

  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.


Now for a solution. The only way you can get continuity in your profiles is to set up ID merge, identify the IDs that need to be merged and merge those IDs into a single ID cluster. This will streamline all events onto one user's activity feed.
 

 

I also encountered the same problem, how to solve it

Userlevel 3
Badge +5

@REInvent did Cherise’ instructions help you?

No, I filtered this event name in mixpanel, and couldn’t find the install event, it should have no relation to distinct_id.

Reply


Mixpanel