Each 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:
All 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.
This 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.
This 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.
Everything 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.
To track transactions, we provide a public API which can send a transaction object (see section Track Transactions). This object must contain the following parameters: