Collecting data with Trackers and Webhooks

  1. Home
  2. Docs
  3. Collecting data with Trackers and Webhooks
  4. Trackers – collecting data from your own applications
  5. JavaScript Trackers (Web and Node.js)
  6. Browser Tracker
  7. Browser Tracker v3 Reference
  8. Plugins
  9. Debugger

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() ], });
Code language: JavaScript (javascript)

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

If you’d like to learn more about Snowplow Insights you can book a demo with our team, or if you’d prefer, you can try Snowplow technology for yourself quickly and easily.