Setting Up Delivery and Clicks Analytics
Notification delivery and open rates allow you to analyze the success of your mobile push campaigns in more detail. To display this data in Reteno, you need to implement the return of the status of messages to our system.
Before proceeding with this step, connect your app to your Reteno account and upload the contact database.
Choose one of the two available methods for transferring push notification status data from your app.
Note
The delivery and clicks analytics methods described below are intended for projects that have not installed Reteno SDK
Public API
Use this Update interaction status API method to return DELIVERED
status (if the notification was delivered to the device).
In addition to the status value in interactionId, also pass the FCM token and the time of status change on the device in the request's body.
Example:
{
"token": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"status": "DELIVERED",
"time": "2020-07-09T15:11:17"
}
There are differences for exporting message delivery data from different operating systems.
iOS
Getting a report on push notifications is possible using "Notification Service Extension" and calling the API inside the service extension.
- Add "Notification Service Extension" to your app.
- In didReceiveNotificationRequest add your code for calling web service to report to your server about the received message.
-
override func didReceive (_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) → Void)
-
didReceiveNotificationRequest should consist of a http request (PUT) with delivered status to Update interaction status.
Enable Background fetch in Capabilities → Background Modes of your app.
Note
The "content-available" and "mutable-content" parameters are enabled (have value == 1) when transmitting tokens to APN. If data transmission is configured via FCM, only the “mutable-content” parameter is enabled and has value == 1.
Learn more about modifying content in delivered notifications in Apple's guide.
Android
Use a service that extends FirebaseMessagingService to receive messages. A service should override the onMessageReceived and onDeletedMessages callbacks.
Tracking click-through rates
In the message editor, you can add a link to the message body without being able to analyze its click rate.
When adding a link, two more fields - es_link_raw
and es_link
- will be passed in the push notification body:
-
es_link_raw
–http://example.com/somelink
– contains the original link that can be opened in the device’s browser or can be an internal link, directing to other app sections; -
es_link
–https://hh.esclick.me/37NdHw333DjRcukc0l
– created based on the added link and contains a wrapped link used for click tracking.
Important
For your mobile app, use the data from the field
es_link_raw
to redirect the user to the app section or to the web resource; use aGET
request by the link ines_link
to track clicks.
Integration with Firebase Message Cloud and BigQuery
BigQuery allows you to process large amounts of data, analyze it in detail using BigQuery SQL, export the information to other services, and or use the data for your custom machine learning models. In order to transmit the statuses of sent mobile notifications to Reteno through this platform, you need to follow these steps:
- Link your project to BigQuery.
- Set up data export from the app to BigQuery:
- Integrate your Reteno account with BigQuery.
Important
Connecting BigQuery as an external data source in Reteno is available in the Growth and Enterprise plans. Please note that BigQuery also has its own pricing plans.
Updated 10 months ago