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 users.
The basic information about the tracked events includes:
- Action – an indicator of the activity type, such as
screen.view
- 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
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 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.
Available modes for Auto-Tracking:
.disabled
- listeners are disabled (default)..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 andviewDidAppear
, the method that recordsVisitedScreen
events).
Auto-Tracking is disabled by default. In order to turn it on, you need to include the following configuration in your code:
Synerise.settings.tracker.autoTracking.enabled = true // 1
Synerise.settings.tracker.autoTracking.mode = .fine // 2
Synerise.settings.tracker.autoTracking.excludedClasses = [SNRSampleViewController.self] // 3
Synerise.settings.tracker.autoTracking.excludedViewTags = [1, 2] // 4
- It enables/disables Auto-Tracking.
- It sets Auto-Tracking mode.
- It is array of classes that have to be excluded from Auto-Tracking.
- It is array of tag numbers for views that have to be excluded from Auto-Tracking.
List of activities tracked automatically
Activity tracked | Activity classes | Action | Label |
---|---|---|---|
All screen views in the application | UIViewController |
screen.view | View controllers name (eg. MyApp.ProductDetailsViewController) |
All interactions with elements of the application UI | UIButton UISwitch UISegmentedControl UISlider UIStepper UIDatePicker |
screen.interaction | 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.
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:
let event: CustomEvent = CustomEvent(label: "My label that will be visible on Activity Stream", action: "my.action")
Tracker.send(event)
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:
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
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:
let parameters: TrackerParams = TrackerParams.make {
builder in
builder.setString("12345", forKey: "campaignId")
builder.setString("campaign12345", forKey: "campaignHash")
}
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)
You can replace ProductViewedEvent
with another event type. Event types are described below.
For more details, see the Tracker.send(_:)
method reference.
Events
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: RegisteredEvent
Mandatory properties: Label
let event: RegisteredEvent = RegisteredEvent(label: "LABEL")
Tracker.send(event)
Customer logged in
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.

Event: LoggedInEvent
Mandatory properties: Label
let event: LoggedInEvent = LoggedInEvent(label: "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: LoggedOutEvent
Mandatory properties: Label
let event: LoggedOutEvent = LoggedOutEvent(label: "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: ProductViewedEvent
Mandatory properties: Label, ProductId, Name
let event: ProductViewedEvent = ProductViewedEvent(label: "LABEL", productName: "PRODUCT_NAME", productId: "12345", params: nil)
event.setCategory("PRODUCT_CATEGORY")
event.setURL(URL(string: "PRODUCT_URL")!)
event.setIsRecommended(true)
Tracker.send(event)
Product added to favorites
Use this event type when a product is added to favorites in your application.

Event: ProductAddedToFavoritesEvent
Mandatory properties: Label
let event: ProductAddedToFavoritesEvent = ProductAddedToFavoritesEvent(label: "LABEL")
Tracker.send(event)
Product added to cart
Use this event type when a product is added to the cart in your application.

Event: ProductAddedToCartEvent
Mandatory properties: Label, SKU, FinalPrice, Quantity
let regularPrice: UnitPrice = UnitPrice(amount: 200)
let discountedPrice: UnitPrice = UnitPrice(amount: 100)
let finalPrice: UnitPrice = UnitPrice(amount: 100)
let event: ProductAddedToCartEvent = ProductAddedToCartEvent(label: "LABEL", sku: "SKU12345", finalPrice: finalPrice, quantity: 1)
event.setName("PRODUCT_NAME")
event.setCategory("PRODUCT_CATEGORY")
event.setCategories(["PRODUCT_CATEGORY_1", "PRODUCT_CATEGORY_2"])
event.setProducer("PRODUCT_PRODUCER")
event.setOffline(false)
event.setRegularPrice(regularPrice)
event.setDiscountedPrice(discountedPrice)
event.setURL(URL(string: "URL")!)
Tracker.send(event)
Product removed from cart
Use this event type when a product is removed from the cart in your application.
Event: ProductRemovedFromCartEvent
Mandatory properties: Label, SKU, FinalPrice, Quantity
let regularPrice: UnitPrice = UnitPrice(amount: 200)
let discountedPrice: UnitPrice = UnitPrice(amount: 100)
let finalPrice: UnitPrice = UnitPrice(amount: 100)
let event: ProductRemovedFromCartEvent = ProductRemovedFromCartEvent(label: "LABEL", sku: "SKU12345", finalPrice: finalPrice, quantity: 1)
event.setName("PRODUCT_NAME")
event.setCategory("PRODUCT_CATEGORY")
event.setCategories(["PRODUCT_CATEGORY_1", "PRODUCT_CATEGORY_2"])
event.setProducer("PRODUCT_PRODUCER")
event.setOffline(false)
event.setRegularPrice(regularPrice)
event.setDiscountedPrice(discountedPrice)
event.setURL(URL(string: "URL")!)
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: RecommendationClickEvent
Mandatory properties: Label, ProductId, Name, CampaignId, CampaignHash
let event: RecommendationClickEvent = RecommendationClickEvent(label: "LABEL", productName: "PRODUCT_NAME", productId: "12345", campaignID: "12345", campaignHash: "CAMPAIGN_HASH", params: nil)
event.setCategory("PRODUCT_CATEGORY")
event.setURL(URL(string: "PRODUCT_URL")!)
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: RecommendationSeenEvent
Mandatory properties: Label, ProductId, Name, CampaignId, CampaignHash
let event: RecommendationSeenEvent = RecommendationSeenEvent(label: "LABEL", productName: "PRODUCT_NAME", productId: "12345", campaignID: "12345", campaignHash: "CAMPAIGN_HASH", params: nil)
event.setCategory("PRODUCT_CATEGORY")
event.setURL(URL(string: "PRODUCT_URL")!)
Tracker.send(event)
Push Notifications Events
Push viewed
This event is used when a push notification is viewed.
Event: PushViewedEvent
let event: PushViewedEvent = PushViewedEvent(label: "LABEL")
Mandatory properties: **Label**
Tracker.send(event)
Push clicked
This event is used when a push notification is clicked.
Event: PushClickedEvent
Mandatory properties: Label
let event: PushClickedEvent = PushClickedEvent(label: "LABEL")
Tracker.send(event)
Push cancelled
This event is used when a push notification is cancelled.
Event: PushCancelledEvent
Mandatory properties: Label
let event: PushCancelledEvent = PushCancelledEvent(label: "LABEL")
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.
- Send silent push with Synerise command
GET_LOCATION
. - The SDK receives location.
AppearedInLocationEvent
is sent.

Event: AppearedInLocationEvent
Mandatory properties: Label, Latitude, Longitude
let latitude: CLLocationDegrees = CLLocationDegrees(52.237049)
let longitude: CLLocationDegrees = CLLocationDegrees(21.017532)
let location: CLLocation = CLLocation(latitude: latitude, longitude: longitude)
let event: AppearedInLocationEvent = AppearedInLocationEvent(label: "LABEL", location: location)
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: HitTimerEvent
Mandatory properties: Label
let event: HitTimerEvent = HitTimerEvent(label: "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: SearchedEvent
Mandatory properties: Label
let event: SearchedEvent = SearchedEvent(label: "LABEL")
Tracker.send(event)
Customer shared event
This event is used when a customer shares something from your application.
Event: SharedEvent
Mandatory properties: Label
let event: SharedEvent = SharedEvent(label: "LABEL")
Tracker.send(event)
Customer visited a screen
This event is used when a customer visits a particular screen within your application.

Event: VisitedScreenEvent
Mandatory properties: Label
let event: VisitedScreenEvent = VisitedScreenEvent(label: "LABEL")
Tracker.send(event)
Crash Event
This event is used when application crashes.
The event is sent automatically by Synerise SDK when you have Crash Handling enabled - Getting Started - Crash Handling.
Obviously, you can send it by yourself when you handle uncaught exception.
Event: CrashEvent
Mandatory properties: Label
let event: CrashEvent = CrashEvent(label: "LABEL")
event.setExceptionName("EXCEPTION_NAME")
event.setExceptionReason("EXCEPTION_REASON")
event.setExceptionStacktrace("EXCEPTION_STACKTRACE")
Tracker.send(event)
Custom Event
This is the only event which requires the action
field, as the field accepts custom action names.
Event: CustomEvent
Mandatory properties: Action, Label
let event: CustomEvent = CustomEvent(label: "My label that will be visible on Activity Stream", action: "my.action")
Tracker.send(event)
- 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\.\-_]+$