Overview
Zixflow automatically tracks push notification delivery and engagement metrics to help you measure campaign performance. The SDK tracks three key lifecycle events:- Delivery Confirmed - When the notification arrives on the device
- Notification Opened - When the user taps the notification
- Action Button Clicked - When the user taps an action button
How Push Tracking Works
When Zixflow sends a push notification, it includes special tracking fields in the data payload:| Field | Purpose |
|---|---|
Zixflow-Delivery-ID | Unique ID for this delivery (links to campaign record) |
Zixflow-Delivery-Token | The FCM/APNs token the notification was sent to |
Note: The SDK automatically handles most tracking for you when using the default push implementation. This section covers advanced customization scenarios.
Tracking Events
1. Delivery Confirmed
When to track: The moment the push payload arrives on the device SDK method:Zixflow.trackMetric({ deliveryID, deviceToken, event: MetricEvent.delivered })
Implementation:
Important: The Zixflow SDK automatically tracks delivery. Manual tracking is only needed for custom implementations.
2. Notification Opened
When to track: When the user taps the notification banner SDK method:Zixflow.trackMetric({ deliveryID, deviceToken, event: MetricEvent.opened })
Implementation:
Note: The SDK automatically tracks opens when using the default push implementation.
3. Action Button Clicked
When to track: When the user taps a named action button SDK method:Zixflow.track({ name: "Push Notification Action Clicked", properties: {...} })
Implementation:
| Property | Type | Required | Description |
|---|---|---|---|
Zixflow-Delivery-ID | string | ✅ | Links event to campaign delivery |
action_index | integer | ✅ | 0-based index of button tapped |
action_name | string | ✅ | Button label (e.g., “Shop Now”) |
Zixflow-Delivery-Token | string | Recommended | FCM/APNs token |
action_deeplink | string | Recommended | Button’s URL |
Action Buttons Format
Theaction_buttons field is a JSON-encoded string containing button definitions:
Raw payload value:
- Maximum 2 buttons per notification (recommended for consistency across platforms)
deeplinkmay be empty — handle gracefully- Button index is 0-based (first button = index 0)
Complete Push Tracking Implementation
Here’s a complete example integrating all tracking events:Tracking Decision Flowchart
Fallback for Non-Zixflow Push
If a push notification doesn’t containZixflow-Delivery-ID (sent from another source), the SDK automatically skips tracking.
For custom analytics on non-Zixflow pushes, use a different event name:
Important: Push notification event names (Push Notification Delivered,Push Notification Opened,Push Notification Action Clicked) are reserved for Zixflow’s delivery pipeline.
Testing Push Tracking
Verify Tracking Events
Enable debug logging to see tracking events:[Zixflow] Push Notification Delivered tracked[Zixflow] Push Notification Opened tracked[Zixflow] Push Notification Action Clicked tracked
Check Campaign Analytics
- Log into Zixflow dashboard
- Navigate to Messaging → Push Notifications
- View campaign metrics:
- Sent - Total notifications sent
- Delivered - Arrived on device
- Opened - User tapped notification
- Clicked - User tapped action button