Purpose: How to report push delivery, opens, and action clicks so campaign analytics stay accurate. For step-by-step platform code, use the SDK guides:
- Flutter — Push Notification Tracking
- React Native — Push Notification Tracking
- iOS — Push Notification Tracking
- Android — Push Notification Tracking
- JavaScript — Push Notification Tracking
Why Push Tracking Matters
When Zixflow sends a push, it records the send. Your app must report what happens on the device:- Did it arrive?
- Did the user open it?
- Did they tap an action button?
Delivery Lifecycle
The Push Payload
Zixflow injects two fields into every push data payload. Use them to associate metrics with the correct delivery.| Field | Example | Purpose |
|---|---|---|
Zixflow-Delivery-ID | "626533406292836846" | Unique delivery ID |
Zixflow-Delivery-Token | "dcFRlDhiRbehM1vg-Lx_yn:..." | Token the push was sent to |
message.data (Flutter/Android) or userInfo (iOS). trackMetric() requires both.
Example payload:
Important: action_buttons is a JSON string, not a nested object. Parse it before use.
The Three Tracking Events
| Moment | Event / method | When to fire |
|---|---|---|
| 1. Delivered | trackMetric(... delivered) → Push Notification Delivered | Payload arrives (onMessage / willPresent / onMessageReceived) |
| 2. Opened | trackMetric(... opened) → Push Notification Opened | User taps the notification (body or action). Fire for both. |
| 3. Action clicked | track('Push Notification Action Clicked', …) | User taps a specific action button (after opened) |
Delivered / Opened parameters
| Parameter | Required | Description |
|---|---|---|
deliveryID | Yes | Zixflow-Delivery-ID |
deviceToken | Yes | Zixflow-Delivery-Token (or cached FCM/APNs token) |
event | Yes | MetricEvent.delivered or MetricEvent.opened |
Action Clicked properties
| Property | Required | Description |
|---|---|---|
Zixflow-Delivery-ID | Yes | Links to the delivery |
action_index | Yes | 0-based button index |
action_name | Yes | Button label (e.g. "Shop Now") |
Zixflow-Delivery-Token | Recommended | Token used for the send |
action_deeplink | Recommended | URL for that button |
Action clicks usetrack(), nottrackMetric(). Always fire opened first, then the action event.
Minimal Flutter example
Action Buttons Format
name— button labeldeeplink— optional URL; empty string means no navigation
Deep Links
When the user opens a push, navigate usingdeeplink_url from the payload (or the action’s deeplink). Tracking and navigation are separate: always report metrics even if routing fails.
Decision Flow
Fallback (no Delivery ID)
IfZixflow-Delivery-ID is missing (e.g. a push not sent by Zixflow), do not call trackMetric. You may still show the notification and handle deep links locally.
Related: Devices & Push Notifications · Channels Overview