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