Snowplow Javascript Tracker 2.7.0 released


Hello all,

We’re hugely excited to announce version 2.7.0 of JavaScript Tracker and version 0.5.0 of JavaScript Tracker Core. These long-awaited releases bring many new features, including new Optimizely summary context, automatic exception tracking and initial rewriting in TypeScript.


Awesome stuff! Trying out the JS error tracking asap.

We currently have this done via StackTrace.js library + the application_error schema that already excists. Do you guys use a library or is it something you wrote yourself?


Hey @Koen87,

We share your excitement!

No, we don’t use any third-party libraries. We wrote very thin wrapper around JS Error API, it attaches callback to document and sends data as self-describing events.


60% of all the Errors we are currently tracking with the new error tracking all come back with “JS Exception. Browser doesn’t support ErrorEvent API.”. Looking into this it seems most of them come from Mobile (both Safari and Chrome).

I was under the impression that most modern browsers all support the ErrorEvent API? Would it be possible to have an option to not send the event when the above Error shows up?


Hello @Koen87,

Yes, JS Tracker has such functionality. You can filter errors by using predicate function as first argument to enableErrorTracking:

snowplow_name_here('enableErrorTracking', function (errorEvent) {
  return !errorEvent.hasOwnProperty('message')

Where errorEvent is standard ErrorEvent, you can filter it by other properties.

In fact modern browsers should support error event handler. What exact versions of mobile OSes send these empty exceptions? Do they have anything in other columns (fileName, lineColumn)? Error event handler was not standardized for a long time, therefore for some browsers there could be another ways to track exceptions.

On the other hand if these browsers are not very modern - many exceptions there may be sensible as they likely don’t support other APIs.


Hi @anton, digging up an old post.

We are getting a lot of those “JS Exception. Browser doesn’t support ErrorEvent API.” errors, and from modern browsers. Below are the 5 configurations that generated the most of those errors today so far:

| os_name     | br_name       | br_version   | 
| Windows 10  | Chrome        | 63.0.3239.84 | 
| Windows 7   | Chrome        | 63.0.3239.84 | 
| Mac OS X    | Chrome        | 63.0.3239.84 | 
| Android 4.x | Mobile Safari | 4.0          | 
| Windows 10  | Firefox       | 57.0         | 

The other columns (line_number, stack_trace) are also empty.
Does anybody else experience this? Why would modern browsers generate empty errorEvent object? Googled that question without any luck.


Hello @borismo,

Indeed, this is quite strange. Especially because I believe your statistics closely resembles actual popularity of environments, which makes me think we’re seeing here something browser-independent (but instead specific to your code-base, bug in tracking or initialization problem). But out of curiosity, can I ask you what proportion we’re talking about? Is it 0.5% or 50% of error events?

This behavior and message is result of absence of relevant fields in captured ErrorEvent and I think it is possible to throw an error without corresponding properties. To narrow down source of problem we need to figure out what exact (and how) error occurs without setting these properties. You can find contextsAdder argument from enableErrorTracking especially useful for that. Basically this is a function that receives an raw ErrorEvent and produces an array of contexts that will be sent along with this error event. And you can access any properties of event or browser to send along with tracked error, you can try for example to JSONify the error and send this JSON as a string to inspect after that.

Please let us know about your findings.


Dear @borismo,
I added Snowplow Error Tracker and I faced this problem too. My most errors are “JS Exception. Browser doesn’t support ErrorEvent API”. Did you find any solution for this problem ?


+1 for seeing the same error message. I think for some reason Snowplow JS tracker failed to get all the error information it needs