Snowplow JavaScript Trackers v3.11.0 released
We are pleased to announce version 3.11.0 of the Snowplow JavaScript Trackers!
Version 3.11.0
New features, fixes and a shift left security enhancement!
On this release, we added the capability to supply a callback to the JavaScript trackers, JavaScript and Browser, to be executed whenever a new session is created on the client side. This callback will give engineers access to a client_session type object with the information about the new session.
newTracker('sp1', '{{collector_url}}', {
/* Other options... */
onSessionUpdate: (clientSession: ClientSession) => void)
});
This is similar to the mobile trackers session callback functionality.
On the Node.js tracker we implemented two new API methods allowing for easier setting of the session id and session index information for hits sent by the tracker.
Finally we introduced gitleaks in the JavaScript trackers repository to prevent hardcoded secrets like passwords, api keys, and tokens leaking in our git repository.
You can see the whole list of features/fixes/enhancements below:
JavaScript/Browser
New features
- Added a
onSessionUpdate
option to allow for supplying a callback to be executed whenever a new session is created on the client side. #1191
Bug fixes
- For dimension-type attributes such as viewport size, we are rounding down the values to the nearest integer, making sure events do not end up in the bad queue. This change has been applied to the canonical properties, but to make sure that a client can detect these unexpected values, we plan to allow fractional values to be tracked on the browser context in a next release. #1195.
Node.js
New features
- Add API methods for setting the sessionId and sessionIndex attributes on hits sent from the Node.js tracker. #1178
Workspace/Infrastructure
- Use gitleaks to detect leaked keys before making their way to the public codebase. #1193
Upgrading
Version 3.11.0 is available as @snowplow/browser-tracker on npm, or as the tag based javascript tracker - available on GitHub Releases, jsDelivr or unpkg.