For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/sources/web-trackers/previous-versions/browser-tracker-v3-reference/plugins/error-tracking.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/api-reference/llms.txt.
Error Tracking
caution
You are reading documentation for an outdated version. Here's the latest one!
This tracker plugin provides two ways of tracking exceptions: manual tracking of handled exceptions using trackError and automatic tracking of unhandled exceptions using enableErrorTracking.
Installation
npm install @snowplow/browser-plugin-error-trackingyarn add @snowplow/browser-plugin-error-trackingpnpm add @snowplow/browser-plugin-error-tracking
Initialization
javascript
import { newTracker, trackPageView } from '@snowplow/browser-tracker';
import { ErrorTrackingPlugin, enableErrorTracking } from '@snowplow/browser-plugin-error-tracking';
newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ ErrorTrackingPlugin() ],
});
enableErrorTracking();
Functions
trackError | Documentation |
enableErrorTracking | Documentation |
Context
This plugin does not add any additional data to context of an event.