At a glance: Measure the success of push-notification campaigns for both iOS and Android platforms.
Important!
Some advertisers implement internal solutions of push notifications. As with any owned media, if you measure the performance of your push notifications with AppsFlyer, their conversions are attributed and reported.
SDK requirements
Push notification measurement requires an SDK API call within the app code.
SDK versions that supporting Push notification:
- iOS: V4.8.5 and later
- Android:-V4.8.0 and later
For implementation details, refer to the Push Notification Measurements section of the SDK integration guides iOS, Android
Setting up a push notification campaign
AppsFlyer supports the measurement of push notification campaigns from all vendors and can also support developers who use Google Cloud Messaging or Apple push notification services directly. The conversions, defined as app opens originating from push notification messages, display in the Retargeting dashboard.
The following parameters are inserted into the Push notification payload. These parameters must appear in an "af" object, as shown in the examples below:
- C
- The name of the campaign.
- is_retargeting=true
- This parameter enables AppsFlyer to recognize a retargeting campaign.
- pid
- the media source which in this case is the push notification provider (e.g mixpanel_int, urbanairship_int, swrve_int)
A list of available parameters can be found here.
Note
The solution is indifferent to the push provider.
Payload examples
See the following list of payload examples by OS and vendor.
Payload for iOS via APNS:
Payload example:
{
"af":{
"c":"test_campaign",
"is_retargeting":"true",
"pid":"push_provider_int"
},
"aps":{
"alert":"Get 5000 Coins",
"badge":"37",
"sound":"default"
}
}
Payload for Android and iOS via Firebase Cloud Messaging
Firebase Cloud Messaging has several API endpoints through which you can send push notifications:
- Legacy HTTP Server Protocol - this API receives the default payload structure as appears above.
"data":{ "af":{ "pid":"braze_int", "is_retargeting":"true", "c":"test_campaign" } }
- HTTP V1 API - this API doesn't accept payloads with nested objects like the Legacy API does. The correct payload format should stringify the
af
object. For example:
"data": { "af": "{\"pid\":\"media_int\",\"is_retargeting\":\"true\", \"c\":\"test_campaign\"}" }
- Firebase console UI - you can send push notifications using Firebase console UI. The payload is added at the last stage (Additional options). Under custom data, add af as Key and the payload as Value. See the following screenshots:
{"pid":"MY_MEDIA_SOURCE","is_retargeting":"true","c":"test_campaign"}
Other third-party vendors
Urban Airship API:
{
"audience":"all",
"notification":{
"alert":"A broadcast message",
"extra":{
"af":{
"pid":"urbanairship_int",
"is_retargeting":"true",
"c":"test_campaign"
}
}
},
"device_types":"ios"
}
For more information, refer to: http://docs.urbanairship.com/api/ua.html
Swrve API:
{
"af":{
"pid":"swrve_int",
"is_retargeting":"true",
"c":"test_campaign"
}
}
For more information, refer to: http://docs.swrve.com/user-documentation/push-notifications/creating-push-notifications/
Braze API:
{
"app_group_id":"getFromBrazeDashboard",
"segment_id":"getFromBrazeDashboard",
"broadcast":true,
"messages":{
"apple_push":{
"alert":"Alert A Message",
"title":"Not Visible, Yet Required",
"body":"Message Body",
"extra":{
"af":{
"pid":"braze_int",
"is_retargeting":"true",
"c":"test_campaign"
}
}
}
}
}
For more information, see Braze push notifications API.
Mixpanel API:
For iOS refer to: https://mixpanel.com/help/reference/ios-push-notifications
For Android refer to: https://mixpanel.com/help/reference/android-push-notifications
Iterable API:
For iOS refer to: https://support.iterable.com/hc/en-us/articles/115000315806
For Android refer to: https://support.iterable.com/hc/en-us/articles/115000331943
Localytics API:
For iOS refer to: http://docs.localytics.com/dev/ios.html#push-messaging-ios
For Android refer to: http://docs.localytics.com/dev/android.html#push-messaging-android
Leanplum API:
Refer to: https://docs.leanplum.com/
Adobe Analytics (Omniture) API:
Refer to: https://marketing.adobe.com/resources/help/en_US/mobile/t_create_push_message.html
Appoxee (Teradata) API:
Refer to: https://appoxee-wiki.atlassian.net/wiki/display/MIC/Push+Message+API
Upsight API:
Refer to: http://help.upsight.com/push/
Omniata API:
Refer to: https://www.omniata.com/guide/push-notifications-email
eMMa API:
Refer to: http://support.emma.io/hc/en-us/sections/201069911-Push-Notifications
Kahuna API:
Refer to: https://app.usekahuna.com/tap/public_docs/Content/APIs/Push.htm
Accengage API:
For iOS refer to: http://docs.accengage.com/display/IOS/iOS#iOS-Notificationscustomparameters
For Android refer to: http://docs.accengage.com/display/AND/Android#Android-RetrievingIn-App/Push/InboxandotherCustomParameterswithaBroadcastReceiver
For further information about AppsFlyer retargeting solution refer to the following article: