enableJSErrorTracking

The enableJSErrorTracking() method enables or disables the recording of JavaScript errors on your website. If enabled, it saves errors as custom events and includes information about the error type and page URL where the error occurred. You'll see them in Analytics > Reports > Custom events or if you create a custom report.

Syntax

enableJSErrorTracking(unique)
Not available
Not available
Not available
Not available
Not available
Not available

Parameters

unique (boolean, optional)

When set to true, you'll only collect unique errors from a page. Duplicate errors from the same page view will be ignored. The default value is true.

Examples

To enable the recording of JavaScript errors:

_paq.push(["enableJSErrorTracking"]);
Not available
Not available
Not available
Not available
Not available
Not available

Notes

  • Some browsers may limit error details if the error occurs in a script loaded from a different origin. Read more