Track browser information with the web trackers
The Snowplow web tracker supports tracking in all modern browsers, including new browser features such as Privacy Sandbox and client hints.
Browser entity
Add an entity to every tracked event that records information about the user's browser. Configure it using the "contexts" object within the tracker configuration object.
Browser entity properties
The browser context entity consists of the following properties:
| Attribute | Description | Required? |
|---|---|---|
viewport | Viewport dimensions of the browser. Arrives in the form of WidthxHeight e.g. 1200x900. | Yes |
documentSize | Document dimensions. Arrives in the form of WidthxHeight e.g. 1200x900. | Yes |
resolution | Device native resolution. Arrives in the form of WidthxHeight e.g. 1200x900. | Yes |
colorDepth | The number of bits allocated to colors for a pixel in the output device, excluding the alpha channel. | Yes |
devicePixelRatio | Ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device. | No |
cookiesEnabled | Indicates whether cookies are enabled or not. More info and caveats at the official documentation. | Yes |
online | Returns the online status of the browser. Important caveats are described in documentation. | Yes |
browserLanguage | The preferred language of the user, usually the language of the browser UI. Defined in RFC 5646. | No |
documentLanguage | The language of the HTML document. Defined in RFC 5646. | No |
webdriver | Indicates whether the user agent is controlled by automation. | No |
deviceMemory | Approximate amount of device memory in gigabytes. | No |
hardwareConcurrency | Number of logical processors available to run threads on the user's computer. | No |
tabId | A UUID identifier for the client browser tab the event is sent from. | No |
Please note that the browser entity is only available since version 3.9 of the tracker.
Automatic event properties
The web trackers automatically capture browser and page information and add it to every event. You don't need to configure or manually include these properties.
Set once per tracker initialization
These values are captured when the tracker initializes and remain constant for the session:
| Property | Description |
|---|---|
br_cookies | Whether cookies are enabled (1 or 0) |
doc_charset | Document character set (e.g., UTF-8) |
br_lang | Browser language |
dvce_screenwidth / dvce_screenheight | Screen resolution |
br_colordepth | Color depth of the display |
os_timezone | User's timezone |
Set on every event
These values are freshly captured for each event:
| Property | Description |
|---|---|
br_viewwidth / br_viewheight | Viewport dimensions at the time of the event |
doc_width / doc_height | Document dimensions at the time of the event |
page_url | Current page URL |
page_referrer | Referrer URL |
domain_userid | Domain user ID (first-party cookie identifier) |
domain_sessionidx | Session index (visit count) |
domain_sessionid | Session ID |
user_id | Business user ID, if set via setUserId() |
Some properties may be omitted when anonymous tracking is enabled.