?> Snowplow JavaScript Tracker 2.15.0 released | Snowplow
Snowplow Outperforms GA4 in GigaOm Comparative Evaluation.
Read More
  1. Home
  2. Blog
  3. Releases
Releases

Snowplow JavaScript Tracker 2.15.0 released

We are pleased to announce a new release of the Snowplow JavaScript Tracker.

Version 2.15.0 introduces two key features around user identification: anonymous tracking capabilities and support for Chrome’s Client Hints (that will replace the traditional useragent string). It also comes with some minor improvements and bug fixes.

Read on below for:

  1. Anonymous Tracking
  2. Support for Chrome’s Client Hints
  3. Other features and bug fixes
  4. Upgrading
  5. Documentation and help

1. Anonymous Tracking

The Snowplow technology is built from the ground up for maximum flexibility and control. In an age of incerasing awareness of user privacy, this should include giving users the ability to decide whether or not they want to track persistent user identifiers with their Snowplow web events. Therefore, we are introducing anonymous tracking capabilities into the Snowplow JavaScript tracker (Github issue). Specifically, we are providing two techniques, full anonymous tracking and anonymous session tracking. By default anonymousTracking: false.

Recommended configurations when using anonymousTracking:

{
    anonymousTracking: true,
    stateStorageStrategy: 'cookieAndLocalStorage' //allows for event buffering
}

or

{
    anonymousTracking: { withSessionTracking: true },
    stateStorageStrategy: 'cookieAndLocalStorage'
}

If using the anonymous session tracking, the session information is stored in a cookie or local storage, depending on the stateStorageStrategy, but no user identifiers are used that exist beyond the users current session. By using a stateStorageStrategy of cookieAndLocalStorage or localStorage the event buffering technology in the tracker can continue working. If you wish to configure the JavaScript Tracker to not use any browser storage then you should use stateStorageStrategy: 'none'.

More information on how to instrument anonymous tracking can be found in the technical documentation.

You may wish to toggle this functionality on or off during a page visit, for example when a user accepts a cookie banner you may want to disable anonymous tracking, or when a user logs in to your site. Information on how to instrument this can be found in the technical documentation. You should also update the stateStorageStrategy when disabling anonymous tracking, by passing a parameter to disableAnonymousTracking method, so that event buffering and user tracking can start to work if your stateStorageStrategy was initially set to none.

2. Client Hints

The Chrome team have announced that the User Agent will be frozen from Chromium 85 onwards, and will be replaced by “Client Hints” (Explainer: Reducing User-Agent Granularity). 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.

Version 2.15.0 of the Snowplow JavaScript tracker comes with support for these Client Hints. If enabled in the tracker initialization, a custom context will be sent with each event.

Specifically, the context be enabled in two ways:

{
    clientHints: true
}

This will capture the “basic” client hints.

{
    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.

More information on Client Hints can be found in the technical documentation.

3. Other features and bug fixes

This tracker also comes with a few other minor features and bug fixes:

4. Upgrading

The tracker is available as a published asset in the 2.15.0 Github release:

To upgrade, Snowplow BDP and Open Source users should host the 2.15.0 version of sp.js asset on a CDN, and load the tracker from there.

5. Documentation and help

Check out the JavaScript Tracker’s documentation:

The v2.15.0 release page on GitHub has the full list of changes made in this version.

Finally, if you run into any issues or have any questions, please raise an issue or get in touch with us via our Discourse forums.

More about
the author

Paul Boocock
Paul Boocock

Paul is a Head of Engineering and enjoys spending his time thinking about Snowplow use cases, the ethics of data collection and user privacy. He works mainly with the teams responsible for the Snowplow Trackers and Data Models.

View author

Ready to start creating rich, first-party data?

Image of the Snowplow app UI