Overview
Learn about the key concepts and available event types.
When you track an event, you send a payload of properties that describe the event. Throughout the documentation, we classify these properties into two categories:
-
Input properties
Data that you explicitly provide to the SDK when you track an event. -
Processed properties
Data that the SDK automatically collects or derives from the input properties.
An event is essentially an enriched payload. It combines the original data with additional context, such as timestamp, user information, session details, and channel-specific data (e.g., the URL of a web page). These added details are known as context.
Structure
Events share a common structure that includes metadata, context, and payload. While the metadata properties are common to all events, the context and payload properties vary based on the channel and event type, as described in the following section.
Properties
These are the properties common to all events:
- sessionIdstring
A unique identifier for the session in UUID format.
This ID is assigned to the session based on the session expiration policy defined in the application.
- userIdstring
A unique identifier for the user in UUID format.
This ID is consistent across sessions based on the anonymity policy defined in the application. It is not the same ID as the one you specify when identifying a user.
- timestampnumber
The timestamp of the event in milliseconds since the Unix epoch.
- contextEventContext
Additional information about the context in which the event occurred.
- typestring
The type of the context.
Currently, only the web context type is supported. As we expand to other channels, new context types like mobile or external will be added.
- tabIdstring
A unique identifier for the tab in UUID format.
This ID is consistent across page loads and refreshes.
- urlstring
The URL of the page in which the event occurred.
- metadataRecord<string,string>
Additional metadata you can provide to enrich the context.
For example, the application name, screen resolution, or any other relevant information.
- type
- payload
The details of the event, which vary depending on the event type.
- typestring
The type of the event, such as userSignedUp, productViewed, or linkOpened.
- type
Examples
Below are examples of enriched events:
{"sessionId": "343dd18a-1ab1-4298-8b19-f14880ba4e9c","userId": "91d286ab-654a-47a3-ae3f-a0c0d661e44d","timestamp": 1440990000,"context": {"type": "web","tabId": "0b032685-0a7e-4cdd-9ff1-9d3af33507a4","url": "https://www.example.com",},"payload": {"type": "linkOpened","link": "https://croct.com",}}
Event types
The following sections provide a quick reference to the different types of events available, grouped by category.
Account events
Below are all events related to user accounts:
Event | Auto tracked | Description |
---|---|---|
Signed up | No | Tracks when a user creates an account. |
Signed in | Yes | Tracks when a user logs into their account. |
Signed out | Yes | Tracks when a user logs out of their account. |
User profile changed | No | Tracks any changes related to a user's account. |
Session events
Below are all events related to user sessions:
Event | Auto tracked | Description |
---|---|---|
Nothing changed | Yes | Tracks periods of user inactivity. |
Session attributes changed | Yes | Tracks changes to session attributes. |
Web browsing events
Below are all events related to web interactions and browsing:
Event | Auto tracked | Description |
---|---|---|
Tab opened | Yes | Tracks when the user opens a new tab. |
Tab URL changed | Yes | Tracks when the user navigates to another page. |
Tab visibility changed | Yes | Tracks when the user switches between tabs. |
Page opened | Yes | Tracks when the user opens a new page. |
Page loaded | Yes | Tracks when a webpage finishes loading. |
E-commerce events
Below are all events related to e-commerce and shopping:
Event | Auto tracked | Description |
---|---|---|
Product viewed | No | Tracks when a user views a product. |
Cart viewed | No | Tracks when a user views their shopping cart. |
Cart modified | No | Tracks when a user modifies their shopping cart. |
Checkout started | No | Tracks when a user starts the checkout process. |
Order placed | No | Tracks when a user places an order. |
Engagement events
Below are all events related to user engagement:
Event | Auto tracked | Description |
---|---|---|
Post viewed | No | Tracks when a user views a blog post. |
Interest shown | No | Tracks topics a user may be interested in. |
Link opened | No | Tracks when a user opens a link. |
Goal completed | No | Tracks the completion of a goal. |