Account Data
Account data is used to capture information about a customer's business, organizational affiliation, or group rather than the individual user themselves. This is crucial when a single account (for example, a company, household, or organization) can have multiple users (individuals) associated with it. By attaching an accountId, you can group interactions and behaviors across all related users for holistic account-level analysis.
The account object includes these fields.
| Field | Type | Description |
|---|---|---|
account.id | string | Required. The unique identifier for the account. |
account.attributes | object | An object for any custom data you want to associate with the account, such as an industry, subscription tier, or company size. |
This JSON structure illustrates a typical account payload, including its unique identifier and custom attributes.
Send account data with an interaction to correctly attribute all interactions to the account.
This example demonstrates including account data alongside a specific user interaction with a product, ensuring both the individual user's behavior and their organizational context are captured.
To automatically and consistently inject the account.id into all interaction events across your site, use the Sitemap. Inject this data using the onActionEvent global handler.
This example assumes the accountId is already available on the page, such as being stored in a global JavaScript variable like window.accountId.
See Also