Skip to main content

We have an AppsFlyer Integration that occasionally uses the customer_user_id as the appsflyer_id. Does anyone know why this would happen?

Here’s an (anonymized) example.

{
  "af_events_api": "true",
  “appsflyer_id": "aaaaBBBBCCC",
  "bundleIdentifier": "com.bundle.app,
  “customer_user_id": "aaaBBBBCCC",
  "eventCurrency": "USD",
  "eventName": "renewal_event",
  "eventTime": "2021-10-08 21:27:43.000",
  "eventValue": "{\"af_revenue\": \"5.99\", \"renewal\": \"true\", \"af_content_id\": \"monthly_plan\", \"af_currency\": \"USD\"}"
}

A correct appsflyer_id looks like a Unix Epoch timestamp with a random number appended like this.

  "appsflyer_id": "1617274484000-5786735",

Does anyone know why it occasionally doesn’t have the correct Appsflyer ID?
 

Hey @John Jusayan 

RevenueCat currently fallback to the app user ID if the AppsFlyer ID was not provided in the subscriber attributes. Previously, these events would have never been dispatched into Appsflyer at all. To debug this, you should check if the customer had the $appsflyerId field before the AppsFlyer event was dispatched. If you have webhooks setup, you can check the event details for the specific event and look at the webhook generated to see if it contains the $appsflyerId in the subscriber_attributes.


@tina “Previously, these events would have never been dispatched into Appsflyer at all.” Can you explain why this was changed? It seems to create unexpected data in AppsFlyer?

I appreciate this is documented as “If the AppsFlyer ID is not set, the customer's App User ID will be used instead.” https://www.revenuecat.com/docs/appsflyer#3-send-revenuecat-events-into-appsflyer

This approach seems to cause AppsFlyer to incorrectly report rc_initial_purchase_event $ Event revenue.


Reply