We’ve been working hard to release a major upgrade to our JavaScript tracker. Version 2.0.0 introduces several things you’ve been asking for, and some big ideas of our own. We’re thrilled to share it with you today.

More Stack Traces

Even with all the context TrackJS captures from the console, network, and visitor, sometimes you just need the stacktrace. In this new version of the Tracker we’ve made it way more likely that you’ll have it. We’ve started wrapping many of the callbacks passed into the browser host function and automatically catching errors that come of them. It’s been tested very thoroughly and there is minimal performance impact.

More Control

Your web applications are unique snowflakes–there is so much variety in how they act, perform, and explode :). We’ve learned that our first attempt at configuration was not sufficient for all the ways you’re trying to use TrackJS, so we’ve rebuilt it and made it much more configurable.

TrackJS.install({
  onError: function (error) {
    // process or manipulate the error
    // return false to ignore
    return true;
  },

  serialize: function (log) {
    // change the behavior of how objects are serialized into the log
    return JSON.stringify(log);
  },

  // customize the console watcher specifically
  console: {
    enabled: true,
    error: false,
    watch: ["log","error"]
  }
});

We’ve added options for you to intercept and decide whether errors should be tracked with the onError callback. And we let you decide how you want log objects to be serialized. You can customize each of our browser watchers independently and a lot more. Check out the configuration docs for more details.

More Details

We also took the opportunity to capture a few more details about errors that you’ve been asking for. We now capture the Remote IP Address of the visitor, the Raw User Agent, and you can pass Custom Version Labels for your application. We hope you can use these to better diagnose your errors and make your app even better! The new JavaScript tracker is available today, grab it from your account and checkout the new docs. If you’ve customized the previous version, you’ll need to make a few tweaks to your configuration, but we think you’ll appreciate the greater control. We’re happy to assist if you need any help, just drop us a line!

Not using TrackJS yet? Grab a free trial and let us help you start finding and fixing bugs!

Did you like this?
CEO TrackJS
Todd is a software engineer, business leader, and developer advocate with 20+ years of experience. He is a co-founder and CEO of TrackJS and Request Metrics,...

What to do Next:

1. Try TrackJS on Your Website

TrackJS gives you the visibility to find and fix your errors before users find them. Get started in 5 minutes tracking errors with all the context you'll need to squash the important bugs in your app.

2. Get the Debugger Newsletter

Join The Debugger for amazing JavaScript tips, debugging walkthroughs, news, and product releases for Request Metrics. No more than once a week, probably a lot less.