Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/sources/web-trackers/testing-debugging.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/cdi/llms.txt.

Test, debug and troubleshoot the web trackers

Latest release version badge for the Snowplow JavaScript Tracker

To prevent data loss and bad events, it's important to test and validate your tracking implementation. Snowplow provides two main tools for this, which work well together.

Snowplow Inspector for browsers​

Use our browser extension to inspect event requests in the browser Developer Tools window.

Snowplow Micro​

A lightweight Snowplow pipeline ideal for sending test events into. You can deploy it through Console or run it locally via Docker.

Debugger plugin​

The debugger plugin logs detailed information about tracked events to your browser's Developer Tools console. For each event, it displays:

  • Event type
  • Schema information for self-describing events and entities
  • All entities attached to the event
  • The complete event payload sent to the Collector

The plugin uses color-coded output to distinguish between different types of information, making it easier to scan through logged events.

note

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

Browser Developer Tools console showing color-coded debugger plugin output for a tracked event, including the event name, attached context entities, and the full payload sent to the Collector

Install plugin​

Tracker DistributionIncluded
sp.js❌
sp.lite.js❌

Download:

Download from GitHub Releases (Recommended)Github Releases (plugins.umd.zip)
Available on jsDelivrjsDelivr
Available on unpkgunpkg

Note: The links to the CDNs above are pinned to a specific version at the time of writing. Check the plugin's GitHub releases for newer versions, and update the pinned version when you upgrade.

javascript
window.snowplow('addPlugin',
"https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-debugger@4.10.2/dist/index.umd.min.js",
["snowplowDebugger", "DebuggerPlugin"]
);

Configuration​

The DebuggerPlugin function accepts an optional logLevel parameter that controls the verbosity of console output.

javascript
window.snowplow('addPlugin',
"https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-debugger@4.10.2/dist/index.umd.min.js",
["snowplowDebugger", "DebuggerPlugin"],
[3] // Log level: 3 = debug (default)
);

The available log levels are:

LevelValueDescription
none0Disables all logging
error1Logs errors only
warn2Logs errors and warnings
debug3Logs errors, warnings, and debug messages (default)
info4Logs all messages

Was this page helpful?