Collected data points
- The events are in JSON format, which lists the properties and their description in comment.
- Events are sent to the server in batches.
- A batch is a subset of events originating from one session. A session can send events in more than one batch.
- The batch size is defined in a run configuration file specific to each app (50 events by default).
Requests meta data
Section titled Requests meta dataEach batch has a common header, a set of device specific, and repeatable information and an array of events, which is immutable. The header is composed at the moment of sending, so it has to be constant info ONLY. The array in the payload is data stored at the moment of collection.
The structure of the batches of events will have the following format:
Events
Section titled EventsEvents meta data
Section titled Events meta dataAll events have a common first part (don’t confuse it with the header explained above). This common section is data which is common for all events by type but is gathered at the moment the event occurred. This common section is a part of the actual event payload.
All event specific properties are appended to this JSON object.
App Start
Section titled App StartThis event describes the absolute start of the app.
The trigger for this event is the absolute start of the app.
This is the first event sent when the SDK is invoked.
App Show
Section titled App ShowThis event is sent when the user brings the app in the foreground (switching from another app, exiting lock screen, etc.). This event means the app is focused.
App Hide
Section titled App HideThis event is sent when the user exit (minimizes) the app, or switches to something else. This event means the app is not focused and the session might end, but we have not completely ended the session yet, as the user might return.
Screenview
Section titled ScreenviewEverything starts with a View event. This is an event which describes the equivalent of a “page view” in the web. This event is sent when the Track Screen API is called.
Single Finger gesture event, when the user is interacting with a loaded screen. This is an event which describes the equivalent of a “click” in the web. This event is defined by the following sequence of touch events:
- Touch Down -> N x Touch Move -> Touch Up
Long press
Section titled Long pressSingle Finger gesture event, when the user is interacting with a loaded screen.
This event is defined by the following sequence of touch events:
- Touch Down → N x Touch Move → Touch Up
- Duration: > 500ms
- Distance: < 24 dp
Drag (Slow Swipe)
Section titled Drag (Slow Swipe)Single Finger gesture event, when the user is interacting with a loaded screen.
This event is defined by the following sequence of touch events:
- Touch Down → N x Touch Move → Touch Up
- Distance: > 48 dp
- Finger Velocity < 100 dp/s
Flick (Fast Swipe)
Section titled Flick (Fast Swipe)Single Finger gesture event, when the user is interacting with a loaded screen.
This event is defined by the following sequence of touch events:
- Touch Down → N x Touch Move → Touch Up
- Distance: > 48 dp
- Finger Velocity > 100 dp/s
Transaction
Section titled TransactionTo track transactions, we provide a public API which can send a transaction object (see section Track Transactions). This object must contain the following parameters:
Dynamic variables
Section titled Dynamic variablesTo track dynamic variables we provide a public API which can send a custom event object (see section Dynamic variables).
Reliable targets (iOS only)
Section titled Reliable targets (iOS only)The identifier associated with each view in your app is the concatenation of the list of its ancestors in the React Native tree view.
This means that if you have the following component:
You may always want to use the same id for this component, even if you publish a new version of the app in which it has been moved in the tree view.
Having a reliable target for a view or a container of views enables the analysis of data across various Snapshots from different dates and versions, including layouts or different A/B testing variations.
Here are examples of how the reliable targets feature can be used:
- Tracking elements that can dynamically move on a page (example: Customizable profile page).
- Tracking elements that you want to monitor from one version to another, even if their position changes (example: Moving carousel position from top to bottom).
- Tracking elements during A/B testing (example: Testing new and old Product page on the same version).
- Tracking elements that can be used on multiple pages (example: Search bar).
- Ensuring that a call to action has a unique identifier wherever it appears on a screen (example: AddtoCart button).
The Contentsquare React Native SDK provides a CSReliableTarget
component that can be used to wrap the component you want to track reliably.
CSReliableTarget
accepts a mandatory name
prop that allows the identification of the component to track.