AppMetrica Blog

Updating tokens: How push campaigns work in AppMetrica

AppMetrica now has one useful checkmark in the push-notifications settings:

I this post we will tell you why it is needed and how it works.

Why should we update tokens?

To send the push to the user we need his unique identifier — push-token. It is issued by the operating system service: Apple Push Notifications Service (APNS) in iOS and Firebase Cloud Messaging (FCM) on Android.

AppMetrica Push SDK receives a token and sends it to our server, then we use it in the push campaign.

How AppMetrica Push works

If the user does not launch the application for a long time, APNS or FCM will recall its token. Since the token that we store on the server becomes invalid, AppMetrica will not be able to deliver a message to the user.

To solve the problem we learned how to update push tokens. Activate Update tokens in the application settings and AppMetirca will automatically re-request the token once a day, via silent push. Silent push does not bother the user: it will not appear in the notification bar and is processed in the background.

How do I set silent push in my app?

In iOS you don't need to make any additional settings. Everything will work automatically.

In Android make sure that the application processes this message format correctly. Otherwise, users can receive not a silent push, but the common one: it will appear in the notification panel and confuse the users.

Updating push tokens makes campaigns more efficient because more users now get into them.


Let's grow the audience together!

AppMetrica Team