Tracking In-App Events
(Optional)
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
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 :
// imports and declaration
import { Platform } from '@ionic/angular';
declare var cordova : any;
var success = function(result) {
}
var failure = function(result) {
}
this.platform.ready().then(() => {
var jsonObjectEvents = { EVENT_NAME : 'From Ionic App',PARTNER_TAG : 'DR_Test', ADDITIONAL_DATA : ''};
cordova.plugins.amlibrary.trackInAppEvents(jsonObjectEvents, success, failure);
}
For sending events, we need primarily EVENT_NAME tag to be sent rest of the details are optional.
PARTNER_TAG : is used for tracking info shared by the host application
ADDITIONAL_DATA : If any other reference the host application needs to track can be shared in this tag.
Updated almost 3 years ago