How it works
The TrackJS agent gathers information and errors by instrumenting the host-functions of the browser, such as
XmlHttpRequest. After the script has been initialized, many of these functions are replaced by the TrackJS agent so that we can watch and trigger errors on actions.
There are 5 ways an error can be transmitted to TrackJS:
- A direct call
- A global call to
- An error is caught from a callback passed into a host function, or helper on our API
- A console message is sent to
- A network request returns with a response code of 400 or greater
Each of these origins is configurable.
Telemetry Timeline and Event Log
TrackJS records events from:
- Calls to
console.info, and the rest of the console functions.
- Network Ajax requests through
- Visitor click and input interactions
Each event is stored into a rolling log of 30 entries. Each log entry is composed of only strings, so no memory leak should occur from this logging. When an error condition occurs the log is flushed out with the error.
TrackJS tracking is supported on:
- Firefox 4.0 and greater
- Chrome 20 and greater
- Safari 5 and greater
- Internet Explorer 9 and greater
Internet Explorer 8 is partially supported. Errors will be tracked and some telemetry captured. However due to browser limitations, we are unable to capture network events.
Internet Explorer 7 and below are not supported, no errors will be tracked. However the TrackJS API will exist on the page and won’t break any code written against it.
By default we will store the IP address that accompanies each error. This is useful information that can reveal the origin of the error. However, in some areas it is against the law or otherwise undesirable for this information to be retained. We have two options for sanitizing IP addresses:
1) We can ignore the data for your account. The IP will not be persisted anywhere.
2) We can truncate the last octet to 0. So
220.127.116.11 would become
You can modify this setting under the “Sensitive Data” section of the Organization Settings for your TrackJS account.