Measuring push notification re-engagement campaigns

At a glance: Measure push notification campaigns on both iOS and Android.

Overview

AppsFlyer supports the measurement of push notification campaigns from all push providers, as well as campaigns implemented directly on top of Firebase Cloud Messaging or Apple Push Notification Services (APNS).

There are 2 possible ways to implement the integration:

  • By utilizing OneLink templates (recommended).
  • By sending a JSON object with an af key in the push notification's payload (legacy).

The conversions display in the Overview dashboard, in the retargeting or unified views.

How does it work?

Once you've completed the steps in this article, your app will work as follows:

  1. You trigger a push notification that contains a OneLink template or an af key in its payload.
  2. The app user receives the push notification and clicks on it.
  3. The app loads and the AppsFlyer SDK starts.
  4. The SDK processes the payload of the push notification that opened the app.
  5. The SDK extracts and sends the attribution data to AppsFlyer.

In the OneLink scenario, if the OneLink is configured to route the user to a specific location in the app, the deep link flow is triggered.

Prerequisites

Before continuing, make sure that your app has the AppsFlyer SDK integrated and can receive push notifications.

Steps

To set up push notification measurement, the following steps must be completed:

  1. Create a push notification that contains a custom data key with the OneLink template or an af key with a JSON object as its value.
  2. Configure the SDK to resolve the custom key (done by the app developer).
  3. Test the integration by triggering a push notification.
  4. View push notification campaigns performance in the dashboard.

1. Creating the push notification

First, create a push notification that contains attribution data using one of the following methods.

 Note

In the following demonstration, we're using Firebase as the push provider. The instructions should be applicable to any push provider, with minor differences (if any). Consult the respective push provider's documentation.

Using OneLink (recommended)Using JSON (legacy)

Using OneLink (recommended)

This is the recommended method of integrating AppsFlyer with push notifications.

  1. Create a OneLink template and set it up for Retargeting.
    Note: OneLink short and long URLs are both supported.
  2. In the push notification custom data, add the OneLink that contains the attribution data you want to send to AppsFlyer.

 Firebase example

In Firebase:

appsflyer-push-custom-data-firebase.png

2. Configuring the SDK

This task requires changes to the app code. Follow the instructions on how to configure the SDK:

  • When implementing the recommended OneLink-based solution:
    1. let the app developer know what's the name of the custom key you added to the notification. In this example, it's af_push_link.
    2. Send them these instructions.
  • When implementing the legacy JSON-based solution, send your developers these instructions.

3. Testing the integration

To test that push notification measurement is integrated correctly, simply trigger a push notification in the campaign you set up in Step 1.

If everything is configured properly, the SDK will:

  1. Listen to push notifications.
  2. Process the attribution data embedded in the push notification and send it to AppsFlyer.
  3. Proceed with the regular deep linking flow, if push notification measurement is implemented using OneLink. 

4. Viewing push notification campaigns in the dashboard

You can see data originating from push notifications in the Retargeting dashboard.

Note: AppsFlyer deduplicates push notification data. Meaning, if identical payloads are received more than once, only one is counted.