Custom Analytics Tracking

Since version 3.2.8 there is an option to set custom analytics tracking mechanism to the SDK.
In version 3.3.0 this mechanism has been updated.

AnalyticsTracker interface

The core of custom analytics tracking is AnalyticsTracker interface located in package. It is an interface for object used to track user behaviour in the SDK. AnalyticsTracker interface exposes three methods trackAction(), trackScreenView() and trackTransaction() which are called whenever the user performs a trackable event. These events could be screen views, various button clicks, etc…

Classes implementing AnalyticsTracker interface must be serializable. More precisely, SDK will use Gson library for serialization and deserialization.

To simplify usability of the SDK we have already implemented AnalyticsTracker for Google Analytics service. You can use this implementation as your tracking mechanism or if you want to develop your own AnalyticsTracker you can use this implementation as a reference. Mentioned implementation is

To use our default implementation of Google Analytics, create an instance of GoogleAnalyticsTracker and add it to your config:


GoogleAnalyticsTracker tracker = new GoogleAnalyticsTracker("YOUR_GA_CLIENT_ID");


Event is passed to appropriate track method every time the user performs a trackable action. All events implement interface.

Event types

We recognize three different types of events.

  • - For tracking screen views
  • - For tracking various user actions
  • - For tracking purchases