GuidesDiscussions
Log In
Guides

Tracking In-App Events

DigitalReef SDK has potential to accept and track In-App Events from the host application, which can be used for tracking the User Journey and make many suggestive In-App message that can be configured and displayed to the user.

The SDK is preconfigured to track the following events by automatically:

  • 1st Open of the Application
  • Application coming to foreground
  • Application going to background

📘

"home_screen" event

In order to have a better control of when your in app message will appear, we highly encourage the integration of a custom event called "home_screen" at your main activity of the app.

Sending events from Host application to SDK

Host Application can add any number of events to be tracked by the SDK.

Example for sending events :

JSONObject jsonObject = new JSONObject();
jsonObject.put("EVENT_NAME", eventName); // "EVENT_NAME" should always be passed as first parameter
IUApp.trackInAppEvents(context, jsonObject);

// Example 1

JSONObject jsonObject = new JSONObject();
jsonObject.put("EVENT_NAME", "home_screen");
IUApp.trackInAppEvents(context, jsonObject);