Snowplow JavaScript Tracker 2.17.0 released

Share

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

Version 2.17.0 includes support for new anonymous tracking features available in the Stream Collector v2.1.0. You can now use your Snowplow pipeline to track events from the web with no user identifiers or PII included. The Stream Collector v2.1.0 will also remove user IP addresses and any cookies, and won’t set any cookies, when using the server side anonymisation mode available in the JavaScript Tracker from v2.17.0.

Read on below for:

  1. Server Side Anonymisation
  2. Improved integration test coverage
  3. Other features and bug fixes
  4. Upgrading
  5. Documentation and help

1. Server Side Anonymisation

The Snowplow JavaScript tracker is now able to inform the collector if it should return a cookie and capture the users IP address and cookies (#842). It achieves this by sending an additional header with requests to the collector which the collector then uses to decide how it should capture and respond to the events.

Note: You must be using Stream Collector 2.1.0 or above for the server anonymisation of the Snowplow JavaScript Tracker 2.17.0 to work or events will fail to send whilst in server anonymisation mode.

When initialising the tracker, you can enable it:

snowplow("newTracker", "sp", "{{collector_url_here}}", {
  appId: "my-app",
  stateStorageStrategy: "none",
  anonymousTracking: { withServerAnonymisation: true }
  contexts: {
    webPage: true,
  }
});

Then you can turn it off and start tracking user information (e.g. when a user accepts a cookie banner):

snowplow('disableAnonymousTracking', 'cookieAndLocalStorage');

You can also turn it back on later if required:

snowplow('enableAnonymousTracking', { withServerAnonymisation: true });

2. Improved integration test coverage

As we head to version 3.0.0 of the Snowplow JavaScript Tracker, we have continued to improve our test coverage (#861) to give us additional confidence with the updates that v3.0.0 will bring. To achieve this, we have continued to leverage Snowplow Micro to give us a large set of integration tests. As of v2.17.0, we now boast 120 integration tests which run across 13 different browser and operating system combinations from IE9 to Safari 14!

3. Other features and bug fixes

This tracker also comes with other under the hood improvements:

4. Upgrading

The tracker is available as a published asset in the 2.17.0 Github release. To upgrade, Snowplow Insights and Open Source users should host the 2.17.0 version of sp.js asset on a CDN, and load the tracker from there.

To quickly test new releases, the Snowplow JavaScript Tracker is now available on the jsDelivr and cdnjs CDN networks. We continue to recommend hosting sp.js yourself, however if you wish to test this release you can do so by using the assets on jsDelivr or cdnjs.

5. Documentation and help

Check out the JavaScript Tracker’s documentation:

The releases page on GitHub has the full list of changes made in these versions.

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.

Share

Related articles