Custom Trackings

NearIT allows to track user engagement events on recipes. Any recipe has at least two default events:

  • Received: the user received a notification
  • Opened: the user tapped on the notification

Usually the SDK tracks those events automatically, but if you write custom code to show notification or content please make sure that at least the "Received" event is tracked.

Warning: Failing in tracking this event cause some NearIT features to not work.

You can track default or custom events using the "sendTracking" method:

NearIT.sendTracking({
    trackingInfo: trackingInfo,
    status: NearIT.RECIPE_RECEIVED
});

NearIT.sendTracking({
    trackingInfo: trackingInfo,
    status: NearIT.RECIPE_OPENED
});

NearIT.sendTracking({
    trackingInfo: trackingInfo,
    status: NearIT.RECIPE_CTA_TAPPED
});

NearIT.sendTracking({
    trackingInfo: trackingInfo,
    status: "my awesome custom event"
});