Event Tracking

Everything your customers do on your website or your mobile application is recorded in the system in real time. Information such as the source of the visit, the URL address they have visited and the chain of actions that followed are saved in Synerise as an event. The scope of gathered information about events is wide and it starts from the kind of performed action, duration and the way it’s done. Synerise collects predefined event parameters which can be extended according to the preferences and needs of the Synerise users.

The basic scope of information about the tracked events includes:

  • Action name – an indicator of the activity type you are dealing with, e.g. page.visit
  • Label – human readable info about activity, e.g. page title
  • Time – the time when an event occurred
  • Client identification – reference to customer that generated the activity
  • Parameters – any parameter that may be required (depending on activity context, e.g. URL of page.visit)

Further on you can enrich events with data from catalogs in Synerise, e.g. a product or service where only ID has been provided can be enriched with other details such as the description, image URL, etc.

Note: Some events are predefined, meaning they have a fixed set of fields that need to be passed at minimum, e.g. productId when we want to pass product.view event

Auto-tracking allows you to monitor each type of the user activity in your mobile application. Every interaction such as click, swipe, view with any element in the application is sent as an event to Synerise together with a collection of details concerning the event, which are available in the overview on the client card. The frequency and the kind of the tracked events are customizable, as you can switch on tracking a particular types of interactions.


Automatically Tracked Activities

Auto-tracking is disabled by default. In order to turn it on you needs to use below config line in your Synerise.Builder.with

Synerise.Builder.with(this, syneriseClientApiKey, appId)
    .trackerTrackMode(FINE)
    ...
    .build();

Accepted values for trackerTrackMode(mode):

DISABLED - listeners are disabled, which is default mode.
EAGER - listeners are set to onTouch() only.
PLAIN - listeners are set to onClick() only.
FINE - listeners are attached to nearly everything in your app (even to Activities and Fragments onStart() method to record VisitedScreen events).

Note: Events are not being sent real time, they’re queued and in most circumstances that’s good compromise between how quick they are sent and battery life.

You can change queuing behavior as described here: Getting Started

List of activities automatically tracked

Action Activity Tracked Label Additional information tracked
screen.view All screen views in Application Activity, Fragment names (eg. ProductDetailsFragment)
screen.interaction All interactions with elements of Application UI viewText or name of control type (if not able to read value) Depending on control tracked we try to automatically read and pass any values that are set depending on type, eg. time, date, position, progress, state, value or if it has been selected.

Declarative Tracking

Declarative tracking is a feature of our SDK where you can declare yourself additional actions that you want to have tracked. Will it be all tracking of product views, screen views, click in signup button, contact with call centre or anything else you may want to implement declarative tracking will help you to do that.

Basic event implementation

In the most basic scenario you can pass simple event as per example below:

Method name: Tracker.send()

Tracker.send(new CustomEvent("my.action", "My label that will be visible on Activity Stream"));

Such events are passed to Synerise as CustomEvent type since an action can be anything that you want.

Parametrized event implementation

Using it like above will simply record activity with action and label names you’ve passed.

You can always send more complex events as in the example below :

TrackerParams params = new TrackerParams.Builder()
                .add("name", "John")
                .add("surname", "Rise")
                .add("company", "Synerise")
                .add("age", 25)
                .add("isGreat", true)
                .add("lastOrder", 384.28)
                .add("count", 0x7fffffffffffffffL)
                .add("someObject", new MySerializableObject())
                .build();
Tracker.send(new CustomEvent("my.action", "My label that will be visible on Activity Stream", params));

Predefined events implementation

In Synerise we have a set of predefined event types where we need to pass minimum set of data that’s required by our backend. This can be achieved via Setters as in the example below:

Method name: Tracker.send()

TrackerParams params = new TrackerParams.Builder()
                .add("campaignHash", "4321")
                .add("campaignId", "1234")
                .build();
ProductViewEvent event = new ProductViewEvent(("Smartphone X", "SM-01-S", "Smartphone X”, params);
event.setCategory(“Smartphones”);
event.setUrl(“myapp://products/CM01-R");
Tracker.send(event);

Whereas you can replace ProductViewEvent with an event type as described in the section below.

Checkout Tracker.Send() method reference for full details.


Available event types

Session Events

Group of events related to user’s session.

User registered event

This event may be used in case you do not use Synerise registration/authentication features and rely fully on own mechanisms but still want to gather events about a user registration.

Event type: RegisteredEvent
Mandatory fields: Label

Declaration:

public RegisteredEvent(@NonNull String label, @Nullable TrackerParams params)

User logged in event

You can use that type of event in case you do not use Synerise login/authentication features and rely fully on own mechanisms but still want to gather event about user logging in.

Event type: LoggedInEvent
Mandatory fields: Label

Declaration:

public LoggedInEvent(@NonNull String label, @Nullable TrackerParams params)

User logged out event

You can use that type of event in case you do not use Synerise login/authentication features and rely fully on own mechanisms but still want to gather event about user logging out.

Event type: LoggedOutEvent
Mandatory fields: Label

Declaration:

public LoggedOutEvent(@NonNull String label, @Nullable TrackerParams params)


Products Events

Group of events related to products and cart.

Product viewed

This event should be used when User has viewed a product (or service) within your Application.

Event type: ProductViewEvent
Mandatory fields: Label, ProductId, Name

Declaration:

public ProductViewEvent(@NonNull String label, @NonNull String productId, @NonNull String name,
                            @Nullable TrackerParams params)

Product added to favorites

Use this event type to record the product that has been added to favorites in your Application.

Event type: AddedToFavoritesEvent
Mandatory fields: Label

Declaration:

public AddedToFavoritesEvent(@NonNull String label, @Nullable TrackerParams params)

Product added to cart

Use this event type to record the product that has been added to cart in your Application.

Event type: AddedToCartEvent
Mandatory fields: Label, Sku, FinalPrice, Quantity

Declaration:

public AddedToCartEvent(@NonNull String label, @NonNull String sku, @NonNull UnitPrice finalPrice, int quantity,
                            @Nullable TrackerParams params)

Product removed from cart

Use this event type to record the product that has been removed from cart in your Application.

Event type: RemovedFromCartEvent
Mandatory fields: Label, Sku, FinalPrice, Quantity

Declaration:

public RemovedFromCartEvent(@NonNull String label, @NonNull String sku, @NonNull UnitPrice finalPrice, int quantity,
                                @Nullable TrackerParams params)


AI Recommendations

Recommendation clicked

Use this event type to record that recommendation has been clicked by User. Please note that in case you use our Widget to present Recommenendation this event is automatically tracked.

Event type: RecommendationClickEvent
Mandatory fields: Label, ProductId, Name, CampaignId, CampaignHash

Declaration:

public RecommendationClickEvent(@NonNull String label, @NonNull String productId, @NonNull String name,
                                    @NonNull String campaignId, @NonNull String campaignHash, @Nullable TrackerParams params)

Recommendation seen

Use this event type to record the recommendation that has been seen by User. Please note that in case you use our Widget to present Recommenendation this event is automatically tracked.

Event type: RecommendationSeenEvent
Mandatory fields: Label, ProductId, Name, CampaignId, CampaignHash

Declaration:

public RecommendationSeenEvent(@NonNull String label, @NonNull String productId, @NonNull String name,
                                   @NonNull String campaignId, @NonNull String campaignHash, @Nullable TrackerParams params)


Other Events

Group of uncategorized events related to user’s location and actions.

User appeared in location

Use this event to record a User who appeared in a location by passing geographic coordinates.

Event type: AppearedInLocationEvent
Mandatory fields: Label, Latitude, Longitude

Declaration:

public AppearedInLocationEvent(@NonNull String label, double lat, double lon, @Nullable TrackerParams params)

User activity timer event

This could be used for profiling or activity time monitoring - you can send “hit timer” when your client starts doing something and send it once again when finishes, but this time with different time signature. Then you can use our analytics engine to measure e.g. average activity time.

Event type: HitTimerEvent
Mandatory fields: Label

Declaration:

public HitTimerEvent(@NonNull String label, @Nullable TrackerParams params)

User searched event

This event shall be used in cases when your User searched for something and you want to track activity in Synerise.

Event type: SearchedEvent
Mandatory fields: Label

Declaration:

public SearchedEvent(@NonNull String label, @Nullable TrackerParams params)

User shared event

This event shall be used in cases when your User shared something from your Application.

Event type: SharedEvent
Mandatory fields: Label

Declaration:

public SharedEvent(@NonNull String label, @Nullable TrackerParams params)

User visited a screen

This event shall be used in cases when your User visited some particular screen within your Application.

Event type: VisitedScreenEvent
Mandatory fields: Label

Declaration:

public VisitedScreenEvent(@NonNull String label, @Nullable TrackerParams params)

Custom Events

This is the only event which requires action field as we accept here your custom action names. Please always use action names as in the following example: context.action, e.g. screen.view

Event type: CustomEvent
Mandatory fields: Action, Label

Declaration:

public CustomEvent(@NonNull String action, @NonNull String label, @Nullable TrackerParams params)

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.