Events and analytics

What the app reports to measure delivery, opens and clicks.

Google and Apple only report whether they accepted the message. To know whether it arrived, was opened or a button was tapped, the app reports it to POST /v1/events, with the public key.

{ "type": "opened", "token": "DEVICE_TOKEN", "notificationId": "01JC…" }

The notificationId is the _phid that comes in each notification's data.

Types

Type When Extra fields
received The app received the notification (useful with the app open or in the iOS extension) notificationId
opened The user tapped the notification notificationId
clicked The user tapped a button notificationId, actionId (button id)
dismissed The user dismissed it (Android) notificationId
permission_granted / permission_denied The notification permission changed —

occurredAt (ISO 8601 or epoch) lets you report events up to 7 days back, for example if the app was offline.

Batches

Send up to 100 events in {"events": [ … ]}. The response is 202 and tells you, per event, whether it was accepted or the rejection reason:

Reason What it means
device_not_found The token isn't registered in that app
not_a_recipient That notification wasn't sent to that device
rate_limited More than 60 events per minute from the same device
invalid_type, notification_required, invalid_action, occurred_at_out_of_range… Error in the event data

Repeats (same device, notification, type and button) are discarded without an error, so you can retry safely.

Where you see it

In the panel's Analytics: funnel, rates, by platform, language and app version, by hour and by button. Also in GET /v1/notifications/{id}.