Events

Events generated by user's interaction with the Mobile Engagement platform are stored in the Business Intelligence and Analytics platform. This platform is independent from the production environment, so a high load on the logging or reporting environment does not affect the campaigns transactional throughput. Events are stored in a proprietary CDR format and a batch process moves them to the Business Intelligence platform every minute, so a small delay is to be expected from event generation and it's availability in the reporting interface.

Each application (mobile app using the SDK, Campaign Manager module or even an external application via the REST API) can generate an arbitrary number of events. This is a design decision of the application developer. This means that different applications can generate different events, and we do not limit which events you may generate. The only condition is that all events must fit in the existing data structure.

The Messangi SDK stores internal events in the BI platform using the existing data structure. Each event includes all the information the SDK knows about the user and the device including the mobile number, device id, location and operating system. Events are fired automatically when the user enters a region, exits a region or even receives a push notification. An app that integrates the Messangi SDK can choose store it's own events using the logEvent facility as documented in the Android and iOS integration guides.

The Messangi SDK generates the following native events:

Field Description
TXT_MSG A push notification was received by the device
GEO_PUSH A geopush was received by the device
CRT_REGION A geofence was created using the Mobile Engagement web interface or REST API, and it was received by the handset and registered into the list of monitored regions
DLT_REGION A geofence was deleted using the Mobile Engagement web interface or REST API, and it was removed from the handset and unregistered from the list of monitored regions
UPDT_REGION A geofence was updated using the Mobile Engagement web interface or REST API, and it was received by the handset
REGION_ENTER The user entered a geofence region and the event was fired in the Mobile Engagement platform
REGION_EXIT The user exited a geofence region and the event was fired in the Mobile Engagement platform
CRT_BEACON An iBeacon was created in the Mobile Engagement web interface or REST API, and it was received and registered by the handset in the list of monitored beacons
DLT_BEACON An iBeacon was deleted using the Mobile Engagement web interface or REST API, and it was deleted from the handset list of monitored beacons
UPDT_BEACON An iBeacon was updated using the Mobile Engagement web interface or REST API, and received by the handset
BEACON_ENTER The user entered an iBeacon region and the event was fired in the Mobile Engagement platform
BEACON_EXIT The user exited an iBeacon region and the event was fired in the Mobile Engagement platform
ERROR An error occurred on the mobile application
SUBSCRIBED The user subscribed to a subscription list
UNSUBSCRIBED The user unsubscribed from a subscription list

The SCRATCHCARD application generates the following events:

Field Description
OPEN The user clicked on the link received via SMS, Push, email or any other channel
SCRATCHED The user scratched completely the card
TIMEOUT The user did not scratch the image (after opening it)
CLICKED The user clicked on the link on the final image in the scratchcard
CONSUME The scratchcard was consumed. This is only available for 'single use' scratchcards

Mobile applications that use the Messangi SDK can generate their own events via the logEvent facility as documented in iOS and Android. This can be used to gather analytics on events specific for that application. These are example events that a mobile app can generate to be added to the BIA database:

Field Description
INIT The application was started
PAUSED The application was paused (was sent to the background)
RESUMED The application was resumed (returned to the foreground)
DESTROYED The application was killed, either by the user or the OS
PUSHRECEIVED A push notification was received

For example, our demo application for Android uses the following code to log custom events into the BI tool (the same methods can be used by a similar app in iOS):

@Override
protected void onCreate(Bundle savedInstanceState) {
        ...
        Messangi.getInstance().logEvent(this, "INIT", null);
        ...
}

@Override
protected void onDestroy() {
        Messangi.getInstance().logEvent(this, "DESTROYED", null);
        super.onDestroy();
}

@Override
protected void onStart() {
        super.onStart();
        Messangi.getInstance().logEvent(this, "STARTED", null);
        Messangi.getInstance().init(this);
}

@Override
protected void onResume() {
        super.onResume();
        Messangi.getInstance().logEvent(this, "RESUMED", null);
        Messangi.getInstance().bindService();
}

@Override
protected void onPause() {
        Messangi.getInstance().logEvent(this, "PAUSED", null);
        Messangi.getInstance().unBindService();
        super.onPause();
}

Passbooks generate the following events:

Field Description
OPEN The user downloaded the passbook