Push Open Tracking

When SmartAppPush delivers a push, it includes a tracking_token in the payload. Report this token back when the user opens the notification to power your analytics.


Endpoint

endpoint
http
POST https://api.smartapppush.ai/pushes/opened

Request

request body
json
{
  "tenant_id": "your_tenant_id",
  "api_key": "your_app_api_key",
  "tracking_token": "uuid-from-push-extra-data"
}

Response

200 OK
json
{
  "success": true
}

Error Responses

StatusMeaning
400Missing required fields (tenant_id, api_key, tracking_token)
401Invalid tenant_id or api_key

How to Implement

  1. When your app receives a push notification, extract tracking_token from the extra_data payload
  2. When the user taps the notification and your app opens, send the tracking token to this endpoint
  3. SmartAppPush marks the push as opened and reflects it in your analytics dashboard

Example Implementation

push-handler.js
javascript
// In your push notification handler
onNotificationOpened(notification) {
  const trackingToken = notification.extra_data?.tracking_token;

  if (trackingToken) {
    fetch("https://api.smartapppush.ai/pushes/opened", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        tenant_id: "your_tenant_id",
        api_key: "your_api_key",
        tracking_token: trackingToken
      })
    });
  }

  // Handle deep linking with extra_data
  navigateToScreen(notification.extra_data?.screen);
}

Why This Matters

Open tracking powers your campaign Health Scores, open rate metrics, and campaign comparisons. Without it, your analytics only show delivery data. With it, you see the full picture: which campaigns actually drive user engagement.

We use cookies to understand how you use our site and improve your experience. No personal data is sold or shared.