Event Spec
Common Fields
Understand the common fields that define the core Formo event data structure.
Formo defines some common fields (event type, timestamps, and more) across all API calls that make up the core event data structure. This guide covers the common and contextual fields in detail.
Common Fields
The Formo SDKs populate the required information automatically.
Name | Datatype | Required | Description |
---|---|---|---|
type | String | ✓ | Captures the type of event. Values can be either identify, track, connect, signature, transaction, and others. |
channel | String | ✓ | Identifies the source of the event. Permitted values are mobile, web, server and sources. |
version | String | ✓ | Version of the event spec. |
project_id | String | ✓ | Unique identification for the project in the database. |
session_id | String | ✓ | Privacy-friendly daily changing session identifier. |
anonymous_id | String | ✓ | Pseudo-identifier for the user in cases where userId is absent. Equivalent to a device ID. |
user_id | String | Unique identification for the user in the database. | |
address | String | Unique wallet address of the user. | |
event | String | Captures the user action that you want to record. | |
context | Object | ✓ | Contains all additional user information. |
properties | Object | Passes all relevant information associated with the event. | |
timestamp | Timestamp | ✓ | Records the actual time (in UTC) when the event occurred. Make sure it conforms to the ISO 8601 date format yyyy-MM-ddTHH:mm:ss.SSSZ. For e.g., 2022-02-01T19:14:18.381Z. |
message_id | String | ✓ | Unique identification for the event. |
Contextual Fields
Contextual fields give additional information about a particular event. The following table describes the available contextual fields.
Name | Datatype | Required | Description |
---|---|---|---|
user_agent | String | The user agent of the device that you are tracking. | |
locale | String | Captures the language of the device. | |
location | String | Geographic location of the user. | |
timezone | String | Captures the timezone of the user you are tracking. | |
referrer | String | The referrer URL where the user came from. | |
utm_source | String | Identifies which site sent the traffic. | |
utm_medium | String | Identifies what type of link was used. | |
utm_campaign | String | Identifies a specific product promotion or strategic campaign. | |
utm_term | String | Identifies search terms. | |
utm_content | String | Identifies what specifically was clicked to bring the user to the site. | |
ref | String | Referral code or identifier. | |
page_url | String | Full URL of the page. | |
page_path | String | Path component of the URL. | |
page_title | String | Title of the page. | |
library_name | String | Name of the SDK used to capture the event. | |
library_version | String | Version of the SDK used to capture the event. |
Sample Event
Here’s an example event with common and contextual fields included:
Was this page helpful?