Skip to main content
All Collections2. Define push_token to mobile analytics
Embedding AppsFlyer + Firebase Cloud Messaging (iOS)
Embedding AppsFlyer + Firebase Cloud Messaging (iOS)
M
Written by Marat Zhanabekov
Updated over 7 months ago

Goals

The goal of this guide is to set up:

  • basic push notifications handling via Firebase Cloud Messaging SDK

  • sending registration_id (push_token in Firebase Cloud Messaging system) to the AppsFlyer system

Android

Prerequisites

It is expected that you’ve already implemented:

Appsflyer SDK

NOTE. In case you use Firebase Push SDK, make sure that you send Firebase registration id (which is also referred to as fcmToken in code examples). Do not confuse it with the APNS push token. The one we need looks like this:

fVB5-GsfONYTmjsOX6POeS:APA91bGOokpBTI_aAO_JybIMfJ8WCPX_77EWVqzOlmsTm6GaUngqRf-hu_ZMXS9JptSOqBJ0YxOGIhnUwZAetYELraJkvzGOJxQCksefcJLsg_1zPi7LYKWqfQ35qLc2CNwb6TFddGv9

  1. Send push_token event with token event property to AppsFlyer via AppsFlyer SDK log event method on every app start. To retrieve the current token, you need to call FirebaseMessaging.Messaging.token() method.

  2. We strongly recommend triggering the push_token event logging on EVERY app start.

  3. REQUIRED. Integrate Deep Links and Deferred Deep Links resolution with the following Appsflyer's guide

  4. REQUIRED. Implement push notification measurement with the following Appsflyer's guide

Did this answer your question?