Event Tracking

Everything your customers do is recorded in the System. What pages they’ve opened, where they came from, and what they saw next.

You will know when they hovered over a banner for a longer time than usual and when they clicked that banner. You can know when they logged in to your mobile application, what parts of that application they have clicked or interacted with - all events are monitored in real-time.

In addition to what we gather automatically, what comes from web form tagging you can always declare many different types of events and gather as much data as you need.

All of the events have at minimum:

  • ACTION – indicator of what activity we are dealing with, in form context.activity so for example page.visit means page has been visited
  • LABEL – human readable info about activity, i.e. page title
  • TIME – time event occurred
  • CLIENT - reference to Client that generated activity
  • PARAMS – any parameter that may be required (depending on activity context, i.e. url for page.visit)
Note: Some events are predefined, meaning have set of fields that need to be passed at minimum, i.e. PRODUCT ID when we want to pass product.view event.

Further on we can enrich events with data from catalogs in Synerise, i.e. product or service where only ID has been provided can be enriched with all the details.

Automatically Tracked Activities

Autotracking 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.

Auto-tracking is disabled by default. In order to turn it on you needs to use below in your code:

Swift:

Synerise.settings.tracker.autoTracking.mode = .fine

Accepted values for Auto-Tracking mode:

DISABLED - Listeners are disabled, which is default mode.

EAGER -Listeners are set to on touch only.

PLAIN - Listeners are set to on click only.

FINE - Listeners are attached to nearly everything in your app (even to activities and viewDidAppear: 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.

List of activities tracked automatically

Action Activity Tracked Label Additional information tracked
screen.view All screen views in Application View controllers name (eg. MyApp.ProductDetailsViewController)
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 most basic scenario you can pass simple event as per example below:

Method name: Tracker.send()

SNRCustomEvent *event = [[SNRCustomEvent alloc] initWithLabel:@"My label that will be visible on Activity Stream" action:@"my.action"];
[SNRTracker send:event];

Such events are passed to Synerise as CustomEvent type since 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.

We can always send more complex events as per below example:

Method name: Tracker.send()

let parameters: TrackerParams = TrackerParams.make {
    builder in
    builder.setString("John", forKey: "name")
    builder.setString("Rise", forKey: "surname")
    builder.setString("Synerise", forKey: "company")
    builder.setInt(57, forKey: "age")
    builder.setBool(true, forKey: "isGreat")
    builder.setDouble(384.28, forKey: "lastOrder")
    builder.setInt(10, forKey: "count")
    builder.setObject(SampleObject(), forKey: "someObject")
}   
let event: CustomEvent = CustomEvent(label: "My label that will be visible on Activity Stream", action: "my.action", params: parameters)
Tracker.send(event)


Predefined events implementation

At 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 per example below:

Method name: Tracker.send()

let parameters: TrackerParams = TrackerParams.make {
    builder in
    builder.setInt("1234", forKey: "campaignHash")
    builder.setInt("1234", forKey: "campaignId")
}
let event: ProductViewEvent = ProductViewEvent(label: "Smartphone X”, productName: “Smartphone X”, productID:”SM-01-S”, params: parameters) event.setCategory(“Smartphones”) event.setURL(URL(string: “myapp://products/SM-01-S") Tracker.send(event)

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

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


Available Events

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 event about user registration.

Event name: RegisteredEvent

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 name: LoggedInEvent

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 name: LoggedOutEvent

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 name: ProductViewEvent

Product added to favourites

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

Event type: AddedToFavoritesEvent

Product added to cart

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

Event name: AddedToCartEvent

Product removed from cart

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

Event name: RemovedFromCartEvent


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 these is automatically tracked.

Event name: RecommendationClickEvent

Recommendation seen

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

Event name: RecommendationSeenEvent


Other Events

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

User appeared in location

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

Event name: AppearedInLocationEvent

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 name: HitTimerEvent

User searched event

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

Event name: SearchedEvent

User shared event

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

Event name: SharedEvent

User visited a screen

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

Event name: VisitedScreenEvent

Custom Events

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

Event name: CustomEvent

😕

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.