Prompt
How do I track opens and clicks on push notifications?
Latest observation
To track opens and clicks on push notifications, you usually instrument two events in your push provider or app analytics:
- Delivery / sent — notification was successfully sent
- Open / click — user tapped the notification and your app or site was opened
Mobile push notifications
1) Track opens
Most push SDKs automatically report an open when the user taps a notification.
Examples:
- Firebase Cloud Messaging (FCM) + analytics: enable Firebase Analytics; notification open events are often tracked automatically if you use notification composer or integrate properly.
- OneSignal / Braze / Airship / CleverTap / etc.: they typically provide built-in “opened” or “clicked” metrics.
You can also manually log an event when the notification is tapped:
- iOS: handle
UNUserNotificationCenterDelegate - Android: handle the notification click intent / activity
2) Track clicks
For mobile push, “click” often means the same as “open” — the tap on the notification. If your notification has:
- action buttons
- deep links
- rich media interactions
then track each action separately as its own event.
3) Add campaign metadata
Include identifiers in the push payload so you can attribute events:
- campaign ID
- notification ID
- message ID
- deep link / destination URL
Example payload fields:
campaign_idmessage_idutm_source=pushutm_medium=notification
Then log the same IDs on open/click so you can join send/open/click data.
Web push notifications
Track click/open
In web push, clicking the notification typically triggers a notificationclick event in your service worker.
You can:
- send an analytics event from
notificationclick - focus/open a window
- pass a tracking ID to your site
Example:
self.addEventListener('notificationclick', event => {
event.notification.close();
event.waitUntil(
fetch('/track/push-click', {
method: 'POST',
body: JSON.stringify({ id: event.notification.data.id })
})
);
});
Open tracking for web push is usually the same as click tracking. Unlike email, push notifications don’t reliably support “open” when merely displayed, because the system UI is external to the app/page.
Recommended approach
Best practice
Track these events:
push_sentpush_deliveredif your provider supports itpush_clickedpush_openedif your platform distinguishes open vs clickpush_action_clickedfor buttons/actionspush_dismissedif supported
Use a consistent event schema
Example:
{
"event": "push_clicked",
"message_id": "abc123",
"campaign_id": "winter_sale_01",
"user_id": "user_456",
"platform": "ios",
"timestamp": "2026-10-14T12:34:56Z"
}
Important caveats
- “Open” and “click” are often the same thing for push.
- Some platforms only provide click/open after the user taps the notification.
- You usually cannot track passive views of a push notification reliably.
- Respect privacy rules and platform policies, especially on iOS and when using advertising identifiers.
If you want, I can show you how to implement this for:
- Firebase/FCM
- iOS
- Android
- Web Push
- a specific provider like OneSignal or Braze