Skip to main content

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:

AttributeDescriptionRequired?
viewportViewport dimensions of the browser. Arrives in the form of WidthxHeight e.g. 1200x900.Yes
documentSizeDocument dimensions. Arrives in the form of WidthxHeight e.g. 1200x900.Yes
resolutionDevice native resolution. Arrives in the form of WidthxHeight e.g. 1200x900.Yes
colorDepthThe number of bits allocated to colors for a pixel in the output device, excluding the alpha channel.Yes
devicePixelRatioRatio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.No
cookiesEnabledIndicates whether cookies are enabled or not. More info and caveats at the official documentation.Yes
onlineReturns the online status of the browser. Important caveats are described in documentation.Yes
browserLanguageThe preferred language of the user, usually the language of the browser UI. Defined in RFC 5646.No
documentLanguageThe language of the HTML document. Defined in RFC 5646.No
webdriverIndicates whether the user agent is controlled by automation.No
deviceMemoryApproximate amount of device memory in gigabytes.No
hardwareConcurrencyNumber of logical processors available to run threads on the user's computer.No
tabIdA UUID identifier for the client browser tab the event is sent from.No
note

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:

PropertyDescription
br_cookiesWhether cookies are enabled (1 or 0)
doc_charsetDocument character set (e.g., UTF-8)
br_langBrowser language
dvce_screenwidth / dvce_screenheightScreen resolution
br_colordepthColor depth of the display
os_timezoneUser's timezone

Set on every event

These values are freshly captured for each event:

PropertyDescription
br_viewwidth / br_viewheightViewport dimensions at the time of the event
doc_width / doc_heightDocument dimensions at the time of the event
page_urlCurrent page URL
page_referrerReferrer URL
domain_useridDomain user ID (first-party cookie identifier)
domain_sessionidxSession index (visit count)
domain_sessionidSession ID
user_idBusiness user ID, if set via setUserId()
note

Some properties may be omitted when anonymous tracking is enabled.

On this page

Want to see a custom demo?

Our technical experts are here to help.