JavaScript Error Tracking


Link to Github page: https://github.com/understand/understand-js

Quick Start

1) Install it using Yarn:

yarn add @understand/understand-js

or Npm:

npm install @understand/understand-js

or include the library from our CDN:

<script src="https://cdn.understand.io/understand-js/v1/bundle.min.js" crossorigin="anonymous"></script>

2) Initialise the library and configure it:

<script>
  Understand.init({
      env: 'production', // define environment
      token : 'your-input-token-from-your-account'
  }).catchErrors()
</script>

Or if you're using module bundlers such as Webpack/Browserify/Rollup/etc.

import Understand from '@understand/understand-js';

Understand.init({
  env: 'production', // define environment
  token : 'your-input-token-from-your-account'
}).catchErrors();

3) Send your first error to Understand.io

try {
  throw new Error('The first error!');
} catch (e) {
  Understand.logError(e);
}

Browser Support

  • Chrome: 20+
  • Firefox: 23+
  • Safari: 8+
  • Opera: 24+
  • IE: 9+
  • iOS: 7+
  • Android: 4.2+