Push
Handles push notification permission and interaction tracking for Segmentify push campaigns.
Handles push notification permission and interaction tracking for Segmentify push campaigns. These events must be sent when a user arrives on your site via a push campaign link where utm_medium=push.
Before sending these events, verify that the campaign URL contains the required UTM parameters: utm_source=segmentify, utm_medium=push, and utm_campaign=pushCampaignName.
Requests:
- Accept Notifications — registers the user’s push subscription with Segmentify’s push service (
psh2.segmentify.com). Sends the browserinstanceIdto associate the subscription with the user. - Deny Notifications — records the user’s decision to deny push notifications. Sent to
gimli-eu.segmentify.comas a GET request withuserId,instanceId,browser, anddeviceas query parameters. - Native Push Permission — registers a native push permission event via
psh2.segmentify.com/native/subscription/push. Used for native app or browser-level push opt-in flows. - Native View Interaction — fires when a user views content after arriving from a push notification (
type: "view"). Sent topsh2.segmentify.com/native/interaction/notification. - Native Click Interaction — fires when a user clicks on a push notification (
type: "click"). Sent topsh2.segmentify.com/native/interaction/notification.
Push Permission
Section titled “Push Permission”POST /native/subscription/push
Example body
{ "deviceToken": "FCM_DEVICE_TOKEN", "type": "PERMISSION_INFO", "providerType": "FIREBASE", "userId": "1234567890123456789", "device": "PC", "os": "ANDROID", "email": "user@example.com"}See this endpoint in the Events API reference.
Native View Interaction
Section titled “Native View Interaction”POST /native/interaction/notification
Example body
{ "os": "IOS", "device": "PC", "type": "VIEW", "instanceId": "psh_xxxx", "userId": "1234567890123456789", "providerType": "FIREBASE"}See this endpoint in the Events API reference.
Native Click Interaction
Section titled “Native Click Interaction”POST /native/interaction/notification
Example body
{ "os": "PC", "device": "PC", "type": "CLICK", "instanceId": "psh_xxxx", "userId": "1234567890123456789", "providerType": "FIREBASE"}See this endpoint in the Events API reference.
Accept Notifications
Section titled “Accept Notifications”POST /subscription/push
Example body
{ "subscriptionId": "PUSH_SUBSCRIPTION_ID", "auth": "PUSH_AUTH_SECRET", "key": "PUSH_P256DH_KEY", "userId": "1234567890123456789", "agent": "ANDROID", "endpoint": "https://fcm.googleapis.com/fcm/send", "deviceType": "ANDROID", "isVapid": false, "fcmToken": "FCM_DEVICE_TOKEN"}See this endpoint in the Events API reference.
Deny Notifications
Section titled “Deny Notifications”GET /subscription/deny
See this endpoint in the Events API reference.