NB. This release continues with the change we introduced with v2.11.0 to how assets are hosted - rather than hosting the tracker on CloudFront, we now publish the asset to the GitHub release. Users who have previously relied on the CloudFront hosted asset must host the tracker on their own CDN, as is recommended practice. More detail can be found in our v2.11.0 release post.
Read on below the fold for:
- New test suite powered by Snowplow Micro
- Local Storage improvements
- Updates and bug fixes
- Documentation and help
1. New test suite powered by Snowplow Micro
Snowplow Micro is a very small Snowplow Pipeline which can be initialised before running tests and then used to validate that data collection has occurred correctly. You can read more about Snowplow Micro in our earlier blog post.
Not only that, as we recommend using Snowplow Micro to build your own test suite, this release is a an example of how to include Snowplow Micro as one part of your testing strategy. The code changes that power our new test suite can be found here and will hopefully prove to be inspiration for your own Snowplow Micro powered test suite!
2. Local Storage improvements
In this release we also focused on ensuring our use of Local Storage is robust and as reliable as our cookie storage strategy. With that in mind, we have fixed two issues that have affected use of Local Storage.
When using the
stateStorageStrategy, any state that was stored had no expiration time. Unlike Cookie storage which have expiry dates built in, Local Storage has no such mechanism. This effected functionality that incremented session counters, as the stored session id never expired when using Local Storage. This has now been solved by implementing expiration functionality on our local storage entries (Github #718). You can read more about the stateStorageStrategy options in our docs
NB. In the event the queue becomes full (due to connectivity issues or ad blockers blocking requests) events will be dropped. This is a change in behaviour from previous releases, which would have only dropped events when Local Storage was full for a site, however we expect with the default value of 1000 that dropped events are unlikely to occur.
The default limit is set to 1000 events in the queue, but it can be configured with the
maxLocalStorageQueueSize argument when initialising the tracker. This functionality can be disabled by setting the
It can be changed at initialisation as follows:
3. Updates and bug fixes
A big thank you to our community for the following contributions:
- @jethron: Fix OptimizelyX context collecting (#730)
- @miike: Core: Add function to allow setting Useragent (#744)
- @max-tgam: Fix dynamic context callbacks sometimes returning null (#743)
Other updates and bugfixes include:
The tracker is available as a published asset in the 2.12.0 Github release:
To upgrade, host the
sp.js asset in a CDN, and call the tracker from there.
There are no breaking API changes introduced with this release.
5. Documentation and help
The v2.12.0 release page on GitHub has the full list of changes made in this version.