AppsFlyer is an extensive analytics that help brands keep track of their attribution and engagement campaigns while providing a large variety of analytics. 

This clientside integration will allow you to to retrieve Batch push notifications opens in the Retargeting section much like the below screenshot:

1. Enabling AppsFlyer SDK to pick up opens

Take the steps described in the official AppsFlyer documentation. AppsFlyer SDK will be able to track push opens : iOS / Android.

2. Adding AppsFlyer data in the push payload

Simply add this few lines in your Batch Custom Payload to enable the notification to be tracked down by AppsFlyer SDK:

⚠️ Please note that the payloads to be used for iOS and Android are not the same.

iOS

{
"data":{
"af":{
"pid":"batch_int",
"is_retargeting":"true",
"c":"test_campaign"
}
}
}

Android

{
"af":{
"pid":"batch_int",
"is_retargeting":"true",
"c":"test_campaign"
}
}

Here is where you will need to paste the payload:

Note that an extra step is needed on Android. You need to add the following code before calling the AppsFlyer AppsFlyerLib.getInstance().sendPushNotificationData method:

if (intent != null) {
val batchPayload = intent.getBundleExtra(Batch.Push.PAYLOAD_KEY)
val af: String? = batchPayload?.getString("af")
if (batchPayload != null && af != null) {
intent = intent.putExtra("af", af)
}

}

3. Record push notifications data on AppsFlyer

AppsFlyer allows you to record push notifications as part of retargeting campaigns by calling the methods documented here: iOS / Android

Did this answer your question?