Snowplow JavaScript Trackers v3.5.0 released

We are pleased to announce version 3.5.0 of the Snowplow JavaScript Trackers!

Version 3.5.0

This release brings two new features to the Web trackers:

Add client session context entity #1077

The tracker can now add a context entity (with client_session v1-0-2 schema as on our mobile trackers) to events with information about the current session. The context entity repeats some of the session information stored in canonical event properties (e.g., domain_userid, domain_sessionid), but also adds new information. It adds a reference to the previous session (previousSessionId) and first event in the current session (firstEventId, firstEventTimestamp). It also adds an index of the event in the session useful for ordering events as they were tracked (eventIndex).

The entity is not added by default, but can be enabled using:

contexts: {
   session: true
}

Add a customizable set of failure HTTP status codes for which collector requests should not be retried #1079

This feature adds 5 HTTP status codes (400, 401, 403, 410, and 422) that, when received in response from Collector, cause the tracker not to retry sending events (i.e., drop the events). Requests with all other 3xx, 4xx, and 5xx status codes are retried. The set of status codes for which events should be retried or not is customizable:

retryStatusCodes: [403], // override default behavior and retry on 403
dontRetryStatusCodes: [418] // force retry on 418

Upgrading

Version 3.5.0 is available as @snowplow/browser-tracker on npm, or as the tag based javascript tracker - available on GitHub Releases, jsDelivr or unpkg.

4 Likes

Hi Matus,
thanks for the new context! I am just wondering if the new properties like previousSessionId will be part of the data models / derived Session table soon?
Best,
David

Hi @davidher_mann,

I don’t have a timeline on that but if it would be of value to you there’s no need for to wait for us! Grabbing these values should be a very simple customisation to add to the models.

Best,

1 Like