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 and what parts of that application they’ve clicked or interacted with - all events are monitored in real time. In addition to what is gathered automatically, you can declare many different types of events and gather as much data as you need by tagging fields in your web forms.
All events have at least the following:
- action - indicates the action type, in the form
context.activity
, so, for example,page.visit
means that a page has been visited - label - human-readable information about the activity, such as a page title
- time - the time when the event occurred
- uuid - a reference to the customer that generated the activity
- params - any additional parameters, some of them are required (depends on the activity context, for example, the url of the page for a
page.visit
)
Authentication
Requests to the SDK may require customer authentication. For more details, see this article.
Automatically tracked activities
All page view events on your website are tracked automatically, unless configured otherwise (see installation and configuration). The same applies to events related to the customer session.
Each time a page is refreshed, the tracking code is initiated. At this moment, a page.visit
event is generated, providing information about the page visited by the customer. This means that for single-page applications, which do not refresh between pages, the page.visit
event must be sent on-demand, as described here.
List of automatically tracked activities
Action | Activity Tracked | Label |
---|---|---|
page.visit | All page views of your tracked domain | Visited page {{page title}} |
session.start | Information about a customer starting a session | Started session |
session.end | Information about a customer ending a session | Session end |
Declarative tracking (custom events)
Aside from automatically tracked activities, you can also create custom events that record customer actions.
This could be the tracking of all product views, screen views, sign-up button clicks, call-center contacts, or anything else you may want.
Example:
|
|
The method takes three arguments:
- The name of the action. (line 2)
- An object that contains optional event parameters (lines 3-14)
- The label of the event. It is displayed in the customer’s activity feed. (line 15)
- 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\.\-_]+$
Allowlisting and denylisting of specific events
You should also revise and define event denylists and allowlists according to your organization’s needs and regulations.
Those lists can be defined per site as described in this article.