Mobile SDK Android: EPZAnalyticsService
From ePrize Developers Wiki
Contents |
Overview
The EPZAnalyticsService class is a Singleton class that provides the necessary logic to queue events to be tracked inside of an app.
Since this class is a Singleton, you will not create an instance of it. Rather, you will simply reference it via the getInstance() to access the methods to be called from the class.
Public Methods
getInstance()
public static synchronized EPZAnalyticsService getInstance()
Returns
EPZAnalyticsService singleton instance.
queueEvent
public void queueEvent(String event, Map<String, Object> data)
Method to add an event to be tracked in the queue of analytics events.
When an event is successfully tracked, a EPZAnalyticsEventTrackedEvent is published to the EPZBusProvider, which your application can subscribe to and react accordingly.
Parameters
event The event name
data Map of event data (may be null)
trackQueuedEvents
public static void trackQueuedEvents()
Method to trigger queued events to be tracked. This method is called automatically when an event is added to the queue via the queueEvent() method, but you may wish to call it manually if there is an error tracking an event (e.g. when there was no Internet connection).