Skip to main content

Debugger

Installationโ€‹

  • npm install @snowplow/browser-plugin-debugger
  • yarn add @snowplow/browser-plugin-debugger
  • pnpm add @snowplow/browser-plugin-debugger

Initializationโ€‹

import { newTracker, trackPageView } from '@snowplow/browser-tracker';
import { DebuggerPlugin } from '@snowplow/browser-plugin-debugger';

newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ DebuggerPlugin() ],
});

Debuggingโ€‹

Adding this plugin will automatically start printing out debug logs to your Developer Tools console. This will help you debug what events are being tracked and what properties are included in each event that is being tracked and to what tracker instance.

Note: You may need to enable Verbose logs in your Developer Tools, as this plugin uses console.debug to output results.

An example of the output from this plugin

Was this page helpful?