Skip to main content
caution
You are reading documentation for an outdated version. Here’s the latest one!

Client Hints tracking

User-agent Client Hints are being rolled out across a number of browsers and are an alternative to the tracking the user-agent, which is particularly useful in those browsers which are freezing the user-agent string. See here for browser support.

This is useful data to capture as browsers are moving away from high entropy user-agent strings. Client Hints offer useful information to understand browser usage without the potential to infringe on a users privacy as is often the case with the user-agent string.

This context be enabled in two ways:

  1. clientHints: true
    • This will capture the "basic" client hints
  2. clientHints: { includeHighEntropy: true }
    • This will capture the "basic" client hints as well as hints that are deemed "High Entropy" and could be used to fingerprint users. Browsers may choose to prompt the user before making this data available.

To see what will be captured please see the JsonSchema file org.ietf/http_client_hints/jsonschema/1-0-0.

The Client Hints context entity is automatically tracked once configured.

Install plugin​

Tracker DistributionIncluded
sp.jsβœ…
sp.lite.js❌

Download:

Download from GitHub Releases (Recommended)Github Releases (plugins.umd.zip)
Available on jsDelivrjsDelivr (latest)
Available on unpkgunpkg (latest)

Note: The links to the CDNs above point to the current latest version. You should pin to a specific version when integrating this plugin on your website if you are using a third party CDN in production.

window.snowplow('addPlugin', 
"https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-client-hints@3/dist/index.umd.min.js",
["snowplowClientHints", "ClientHintsPlugin"]
);

Context entity​

Adding this plugin will automatically capture this context entity.

Example information:

{
"isMobile": false,
"brands": [
{
"brand": "Google Chrome",
"version": "89"
},
{
"brand": "Chromium",
"version": "89"
}
]
}