Event tracking

Everything your customers do in your mobile application is recorded in the system in real time, queued and automatically sent in batches to Synerise. 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 events and their parameters.

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. You can change the queuing behavior as described in the Settings article.

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.
    Important: Currently unused
  • 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
Click here to see example of an event

{
  "action": "screen.view",
  "eventUUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "unique": null,
  "createDate": 1659456038993,
  "label": "PromotionViewScreen",
  "params": {
    "ip": "xx.xx.xxx.xxx",
    "source": "MOBILE_APP",
    "clientId": 1111111111,
    "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "eventUUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "businessProfileId": 1234,
    "eventCreateTime": "2022-08-02T16:00:38.993Z",
    "time": 1659456038993,
    "modifiedBy": {
      "businessProfileApiKey": null,
      "clientApiKey": null,
      "clientId": null,
      "userId": null
    },
    "clientId": 5790194467,
  }
}

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.

Automatically tracked events


WARNING: Automatic tracking is available only for Android SDK and iOS SDK. Auto-tracking is not supported for applications built with Jetpack Compose and SwiftUI. These applications should use declarative tracking.

Auto-tracking allows you to monitor each type of the customer activity in your mobile application and it is enabled by default. Every interaction (such as click, view, swipe) 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 profile’s 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 events is:

  • Enabled by default for Android.
  • Disabled by default for iOS.

Available modes for auto-tracking:

  • DISABLED - Listeners are disabled (default mode for iOS SDK).
  • 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 that record the visited screen event (default mode for Android SDK).

You may configure auto-tracking with various options to customize your expected behavior and track events you want. See possible configuration options below:

Synerise.settings.tracker.autoTracking.enabled = false; // 1
  1. It enables/disables auto-tracking.
  2. It sets auto-tracking mode.
  3. It is an array of classes that you want to exclude from auto-tracking.
  4. It is an array of tag numbers for views that you want to exclude from auto-tracking.

List of events tracked automatically


Important: To ensure correct tracking of the push notification related events, you must configure push notifications first.

Android

Action name Description Label Additional information tracked
screen.view This event is generated when any screen of a mobile app is displayed by a mobile app user. Activity, Fragment names (for example, ProductDetailsFragment)
screen.interaction This event is generated every time a mobile app user interacts with any element of the application UI. viewText or the name of control type (if not able to read a value) Depending on the UI element type tracked, Synerise automatically reads and passes any values that are set depending on type, such as: time, date, position, progress, state, value, or if the element has been selected.

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

Action name Description Additional information
push.view A push notification was shown to the app user. The campaign data is tracked.
push.click A push notification was clicked. The campaign data is tracked.
push.send A push notification was sent by Synerise. This event is generated by the Synerise backend.
push.dismiss A push notification was dismissed Sent when a user rejects your notification or clears all notifications.
push.notSent A push notification failed to be created in backend. This event is generated by the Synerise backend. Usually occurs when notification encryption is enabled in your business profile, but your application did not generate a key pair.
push.notRegistered A push notification failed to be created in backend. This event is generated by the Synerise backend. Usually occurs when it is a problem with user’s token.

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.

WARNING:

DO NOT send transaction.charge events as custom events.
Transactions must be tracked with these endpoints:

Basic custom event

In the most basic scenario, you can pass an event as in the examples below:

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.

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\.\-_]+$
    

Custom events with more parameters

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

Synerise offers a set of predefined event types that require a minimum set of data for the backend.

They can be sent by using Setters as in the following example. The example uses the Product viewed event.

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);
Android iOS React Native Flutter
Tracker.send(event) method Tracker.send(_:) method Synerise.Tracker.send(event) method Synerise.tracker.send(event) method

Predefined event list


The list contains the list of predefined events which you can implement.

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 when a customer registers.

Action name of the generated event: client.register

Example:

RegisteredEvent event = new RegisteredEvent("label")
Tracker.send(event);
OS Event Required fields
Android RegisteredEvent Label
iOS RegisteredEvent Label
React Native RegisteredEvent Label
Flutter RegisteredEvent Label

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 when a customer logs in.

Action name of the generated event: client.login

Logged in event
Logged in event

Example:

LoggedInEvent event = new LoggedInEvent("label")
Tracker.send(event);
OS Event Required fields
Android LoggedInEvent Label
iOS LoggedInEvent Label
React Native LoggedInEvent Label
Flutter LoggedInEvent Label

Customer logged out


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 when a customer logs out.

Action name of the generated event: client.logout

Example:

LoggedOutEvent event = new LoggedOutEvent("label")
Tracker.send(event);
OS Event Required fields
Android LoggedOutEvent Label
iOS LoggedOutEvent Label
React Native LoggedOutEvent Label
Flutter LoggedOutEvent Label

Product viewed


Use this event to track customer visits to a product in your mobile application.

Action name of the generated event: product.view

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

Example:

ProductViewEvent event = new ProductViewEvent("label", "productId", "productName");
Tracker.send(event);
OS Event Required fields
Android ProductViewEvent Label, ProductId, Name
iOS ProductViewedEvent Label, ProductId, Name
React Native ProductViewedEvent Label, ProductId, Name
Flutter ProductViewedEvent Label, ProductId, Name

Product added to favorites


Use this event to track adding a product to favorites in your mobile application.

Action name of the generated event: product.addToFavorite

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

Example:

AddedToFavoritesEvent event = new AddedToFavoritesEvent("label");
Tracker.send(event);
OS Event Required fields
Android AddedToFavoritesEvent Label
iOS ProductAddedToFavoritesEvent Label
React Native ProductAddedToFavouritesEvent Label
Flutter ProductAddedToFavouritesEvent Label

Product added to cart


Use this event to track adding a product to a cart in your mobile application.

Action name of the generated event: product.addToCart

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

Example:

UnitPrice unitPrice = new UnitPrice(price, Currency.getInstance(Locale.US));
AddedToCartEvent event = new AddedToCartEvent("label", "sku", unitPrice, 1);
Tracker.send(event);
OS Event Required fields
Android AddedToCartEvent Label, Sku, FinalPrice, Quantity
iOS ProductAddedToCartEvent Label, SKU, FinalPrice, Quantity
React Native ProductAddedToCartEvent Label, SKU, FinalPrice, Quantity
Flutter ProductAddedToCartEvent Label, SKU, FinalPrice, Quantity

Product removed from cart


Use this event to track removing a product from a cart in your mobile application.

Action name of the generated event: product.removeFromCart

Example:

UnitPrice unitPrice = new UnitPrice(price, Currency.getInstance(Locale.US));
RemovedFromCartEvent event = new RemovedFromCartEvent("label", "sku", unitPrice, 1);
Tracker.send(event);
OS Event Required fields
Android RemovedFromCartEvent Label, Sku, FinalPrice, Quantity
iOS ProductRemovedFromCartEvent Label, SKU, FinalPrice, Quantity
React Native ProductRemovedFromCartEvent Label, SKU, FinalPrice, Quantity
Flutter ProductRemovedFromCartEvent Label, SKU, FinalPrice, Quantity

Recommendation viewed

Use this event to track when a recommendation is displayed to a customer.

Action name of the generated event: recommendation.view

For iOS and Android only: If you use the Widget to present recommendations, this event is tracked automatically.

Example:

List<String> items = Arrays.asList("PRODUCT_ID_1", "PRODUCT_ID_2!");
RecommendationViewEvent event = new RecommendationViewEvent("LABEL", items, "12345", "1234", "corr", params)

Tracker.send(event)
OS Event Required fields
Android RecommendationViewEvent Label, items OR ProductId and Name, CampaignId, CampaignHash
iOS RecommendationViewEvent Label, items, Name, CampaignId, CampaignHash
Flutter RecommendationViewEvent Label, items, Name, CampaignId, CampaignHash

Recommendation seen


Note: This is a legacy event. You should use recommendation.view instead.
Use this event to track recommendation display to a customer.

Action name of the generated event: recommendation.seen

For iOS and Android only: If you use the Widget to present recommendations, this event is tracked automatically.

Example:

RecommendationSeenEvent event = new RecommendationSeenEvent("label", "productId", "productName", "campaignId", "campaignHash");
Tracker.send(event);
OS Event Required fields
Android RecommendationSeenEvent Label, ProductId,Name, CampaignId, CampaignHash
iOS RecommendationSeenEvent Label, ProductId, Name, CampaignId, CampaignHash
React Native RecommendationSeenEvent Label, ProductId, Name, CampaignId, CampaignHash
Flutter RecommendationSeenEvent Label, ProductId, Name, CampaignId, CampaignHash

Recommendation clicked


Use this event to track recommendation clicks.

Action name of the generated event: recommendation.click

For iOS and Android only: If you use the Widget to present recommendations, this event is tracked automatically.

Example:

RecommendationClickEvent event = new RecommendationClickEvent("label", "productId", "productName", "campaignId", "campaignHash");
Tracker.send(event);
OS Event Required fields
Android RecommendationClickEvent Label, ProductId,Name, CampaignId, CampaignHash
iOS RecommendationClickEvent Label, ProductId, Name, CampaignId, CampaignHash
React Native RecommendationClickEvent Label, ProductId, Name, CampaignId, CampaignHash
Flutter RecommendationClickEvent Label, ProductId, Name, CampaignId, CampaignHash

Customer appeared in location


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

  1. Send a silent push with the Synerise command GET_LOCATION.
  2. SDK retrieves the location.
  3. Use the data from the GET_LOCATION response to send the AppearedInLocation event.

Action name of the generated event: client.location

Appeared in location event sent after sending silent notification
The "appeared in location" event is sent after a silent push

Example:

AppearedInLocationEvent event = new AppearedInLocationEvent("label", 48.1599, 11.5761);
Tracker.send(event);
OS Event Required fields
Android AppearedInLocationEvent Label, Latitude, Longitude
iOS AppearedInLocationEvent Label, Latitude, Longitude
React Native AppearedInLocationEvent Label, Latitude, Longitude
Flutter AppearedInLocationEvent Label, Latitude, Longitude

Customer activity timer


Use this event to measure the duration of any customer activity - send Hit timer when a customer starts an activity and send it again with a different time signature when the customer finishes. After that, you can use the Analytics module to measure, for example, average activity time. You can add a custom parameter to the timer events so you can recognize them.

Action name of the generated event: client.hitTimer

Example:

HitTimerEvent event = new HitTimerEvent("label");
Tracker.send(event);
OS Event Required fields
Android HitTimerEvent Label
iOS HitTimerEvent Label
React Native HitTimerEvent Label
Flutter HitTimerEvent Label

Customer searched


Use this event to track search queries - every time a customer types a query in the search box in your mobile application, this event will be generated.

Action name of the generated event: client.search

Example:

SearchedEvent event = new SearchedEvent("label");
Tracker.send(event);
OS Event Required fields
Android SearchedEvent Label
iOS SearchedEvent Label
React Native SearchedEvent Label
Flutter SearchedEvent Label

Customer shared


Use this event to track customer sharing something from your application.

Action name of the generated event: client.shared

Example:

SharedEvent event = new SharedEvent("label");
Tracker.send(event);
OS Event Required fields
Android SharedEvent Label
iOS SharedEvent Label
React Native SharedEvent Label
Flutter SharedEvent Label

Customer visited a screen


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

Action name of the generated event: screen.view

Event sent when a user visits a screen
Event sent when a mobile app user visits a screen

Example:

VisitedScreenEvent event = new VisitedScreenEvent("label");
Tracker.send(event);
OS Event Required fields
Android VisitedScreenEvent Label
iOS VisitedScreenEvent Label
React Native VisitedScreenEvent Label
Flutter VisitedScreenEvent Label

Crash Event


This event is used when the application crashes.

The event is sent automatically by Synerise SDK when you enable crash handling while configuring the SDK.

You can send it by yourself when you handle an uncaught exception.

Action name of the generated event: client.applicationCrashed

Example:

let event: CrashEvent = CrashEvent(label: "LABEL")
event.setExceptionName("EXCEPTION_NAME")
event.setExceptionReason("EXCEPTION_REASON")
event.setExceptionStacktrace("EXCEPTION_STACKTRACE")

Tracker.send(event)
OS Event Required fields
Android CrashEvent Label
iOS CrashEvent Label
React Native n/a Label
Flutter n/a Label

Push viewed


Use this event to track viewing a push notification.

Important: Push events are tracked automatically for Android and React Native (if the notifications have been configured for React Native according to iOS or Android ).

Action name of the generated event: push.view

let event: PushViewedEvent = PushViewedEvent(label: "LABEL")

Tracker.send(event)
OS Event Required fields
Android PushViewedEvent Label
iOS PushViewedEvent Label
React Native PushViewedEvent Label
Flutter PushViewedEvent Label

Push clicked


Use this event to track tapping a push notification.

Important: Push events are tracked automatically for Android and React Native (if the notifications have been configured for React Native according to iOS or Android ).

Action name of the generated event: push.click

let event: PushClickedEvent = PushClickedEvent(label: "LABEL")

Tracker.send(event)
OS Event Required fields
Android ClickedPushEvent Label
iOS PushClickedEvent Label
React Native ClickedPushEvent Label
Flutter PushClickedEvent Label

Push cancelled


Use this event to track dismissing push notifications.

Important: Push events are tracked automatically for Android and React Native (if the notifications have been configured for React Native according to iOS or Android ).

Action name of the generated event: push.dismiss

let event: PushCancelledEvent = PushCancelledEvent(label: "LABEL")

Tracker.send(event)
OS Event Required fields
Android CancelledPushEvent Label
iOS PushCancelledEvent Label
React Native PushCancelledEvent Label
Flutter PushCancelledEvent Label
😕

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