Event tracking

Everything your customers do on your website or in 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 information gathered about events is wide. Synerise collects predefined event parameters which can be extended according to the preferences and needs of the Synerise customers.

The basic information about the tracked events includes:

  • Action name – an indicator of the activity type, such as screen.view
  • Label – human-readable information about the activity, such as the page title
  • Time – the time when the event occurred
  • Customer identification – an identifier of the customer who performed the activity
  • Parameters – additional parameters, depending on the type of the event
Note: Some events are predefined, meaning they have a fixed set of fields that must be sent. For example, a product.view event must include the product ID.

You can enrich events with data from catalogs in Synerise, for example, a product or service event where only an ID has been provided can be enriched with other details such as the description, image URL, and more.

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

Automatically tracked activities

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

Auto-tracking is enabled by default. In order to turn it off, you need to include the following configuration in the settings:

Synerise.settings.tracker.autoTracking.enabled = false;

Accepted values for trackerTrackMode(mode):

  • PLAIN - listeners are set to track screen-visits only.
  • FINE - listeners are attached to nearly everything that is clickable in your app, including screen visits.
Note: Events are not sent in real time, they’re queued. In most circumstances, that’s a good compromise between how quick events are sent and battery life.

You can change the queuing behavior as described here: Getting Started.

List of activities tracked automatically

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 the control type tracked, we try to automatically read and pass any values that are set depending on type, such as: time, date, position, progress, state, value, or if the control has been selected.

Automatically tracked push events

Some events are automatically generated when there is an interaction with push notification.

Action Push notification state Additional information
push.view Push notification is visible to the user Campaign title and campaign type are tracked
push.click Push notification is clicked
push.send Push notification is send via Synerise Backend This event is generated by our backend
push.dismiss Push notification is dismissed Sent when a user rejects your notification or clears all notifications
push.notSent Error occurs while creating notification on backend side This event is generated by our backend. Usually occurs when notification encryption is enabled in your business profile, but your application did not generate a key pair.

Declarative tracking

Declarative tracking is a feature of our SDK that allows you to declare additional actions for tracking.

Product views, screen views, clicking a sign up button, contact with the call center, and more: you can implement anything and declarative tracking will help you to do that.

Basic event implementation

In the most basic scenario, you can pass a simple event as in the 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 the CustomEvent type, since the action can be anything that you want.

Parameterized event implementation

If you want to send more complex events, you can include additional parameters:

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 that require a minimum set of data for the backend.

This can be achieved by using 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);

You can replace ProductViewEvent with another event type. Event types are described below.

For more details, see the Tracker.Send() method reference.


Session events

Events related to a customer’s session.

Customer registered

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

Event type: RegisteredEvent
Mandatory fields: Label

Declaration:

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

Example:

RegisteredEvent event = new RegisteredEvent("label")
Tracker.send(event);

Customer logged in event

This event may be used if you do not use Synerise login/authentication features and rely fully on your own mechanisms, but still want to gather events about a customer logging in.

Logged in event
Logged in event

Event type: LoggedInEvent
Mandatory fields: Label

Declaration:

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

Example:

LoggedInEvent event = new LoggedInEvent("label")
Tracker.send(event);

Customer logged out event

This event may be used if you do not use Synerise login/authentication features and rely fully on your own mechanisms, but still want to gather events about a customer logging out.

Event type: LoggedOutEvent
Mandatory fields: Label

Declaration:

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

Example:

LoggedOutEvent event = new LoggedOutEvent("label")
Tracker.send(event);

Product events

Group of events related to products and the cart.

Product viewed

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

Event sent when the user sees an item
Event sent when the user sees an item

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

Declaration:

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

Example:

ProductViewEvent event = new ProductViewEvent("label", "productId", "productName");
Tracker.send(event);

Product added to favorites

Use this event type when a product is added to favorites in your application.

Event sent when a user adds an item to favorites
Event sent when a user adds an item to favorites

Event type: AddedToFavoritesEvent
Mandatory fields: Label

Declaration:

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

Example:

AddedToFavoritesEvent event = new AddedToFavoritesEvent("label");
Tracker.send(event);

Product added to cart

Use this event type when a product is added to the cart in your application.

Event sent when a user adds an item to cart
Event sent when a user adds an item to cart

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)

Example:

UnitPrice unitPrice = new UnitPrice(price, Currency.getInstance(Locale.US));
AddedToCartEvent event = new AddedToCartEvent("label", "sku", unitPrice, 1);
Tracker.send(event);

Product removed from cart

Use this event type when a product is removed from the 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)

Example:

UnitPrice unitPrice = new UnitPrice(price, Currency.getInstance(Locale.US));
RemovedFromCartEvent event = new RemovedFromCartEvent("label", "sku", unitPrice, 1);
Tracker.send(event);

AI recommendations

Recommendation clicked

Use this event type when a customer clicks a recommendation.

If you use our Widget to present recommendations, this event is tracked automatically.

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)

Example:

RecommendationClickEvent event = new RecommendationClickEvent("label", "productId", "productName", "campaignId", "campaignHash");
Tracker.send(event);

Recommendation seen

Use this event type when a customer sees a recommendation.

If you use our Widget to present recommendations, this event is tracked automatically.

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)

Example:

RecommendationSeenEvent event = new RecommendationSeenEvent("label", "productId", "productName", "campaignId", "campaignHash");
Tracker.send(event);

Other events

Uncategorized events related to customer’s location and actions.

Customer appeared in location

Use this event to record a customer’s presence at a location by passing geographic coordinates.

  1. Send silent push with Synerise command GET_LOCATION.
  2. SDK retrieves the location.
  3. AppearedInLocation event is sent.
Appeared in location event sent after sending silent notification
The "appeared in location" event should be sent after a silent push

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

Declaration:

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

Example:

AppearedInLocationEvent event = new AppearedInLocationEvent("label", 48.1599, 11.5761);
Tracker.send(event);

Customer activity timer event

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

Event type: HitTimerEvent
Mandatory fields: Label

Declaration:

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

Example:

HitTimerEvent event = new HitTimerEvent("label");
Tracker.send(event);

Customer searched event

This event is used when a customer searches for something and you want to track that activity in Synerise.

Event type: SearchedEvent
Mandatory fields: Label

Declaration:

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

Example:

SearchedEvent event = new SearchedEvent("label");
Tracker.send(event);

Customer shared event

This event is used when a customer shares something from your application.

Event type: SharedEvent
Mandatory fields: Label

Declaration:

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

Example:

SharedEvent event = new SharedEvent("label");
Tracker.send(event);

Customer visited a screen

This event is used when a customer visits a particular screen within your application.

Event sent when a user visits a screen
Event sent when a user visits a screen

Event type: VisitedScreenEvent
Mandatory fields: Label

Declaration:

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

Example:

VisitedScreenEvent event = new VisitedScreenEvent("label");
Tracker.send(event);

Custom events

This is the only event which requires the action field, as the field accepts custom action names.

Important:
  • The action name must follow the context.action convention. For example: screen.view, product.buy, social.share
  • The action name must be up to 32 characters long and must match the following regular expression:
    ^[a-zA-Z0-9\.\-_]+$
    

Event type: CustomEvent
Mandatory fields: Action, Label

Declaration:

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

Example:

CustomEvent event = new CustomEvent("label", params);
Tracker.send(event);
😕

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.

Close modal icon Placeholder alt for modal to satisfy link checker