Skip to main content

Snowplow

Web Source code Package

Snowplow is a behavioral data platform for collecting and routing event data. The destination sends events via the browser tracker, supporting both the npm @snowplow/browser-tracker and the JavaScript tracker (sp.js). walkerOS handles tracker initialization, plugin loading, activity tracking (page pings), and self-describing ecommerce events with context entities.

Where this fits

Snowplow is a web destination in the walkerOS flow:

Installation

Loading...

The destination supports two tracking approaches:

  • JavaScript tag (sp.js): loads the Snowplow tracker script from CDN
  • npm packages: uses @snowplow/browser-tracker for smaller bundles and tree-shaking

Loads the Snowplow tracker script automatically. Simple setup, works everywhere.

Loading...

See bundled mode setup | CLI reference

Configuration

This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.

Settings

PropertyTypeDescriptionMore
collectorUrlstringSnowplow collector endpoint URL
appIdstringApplication identifier
trackerNamestringTracker instance name
platformstringPlatform identifier
pageViewTrackingbooleanEnable automatic page view tracking
snowplowobjectSnowplow-specific ecommerce configuration
discoverRootDomainbooleanDiscover root domain for cookies
cookieSameSite'Strict' | 'Lax' | 'None'Cookie SameSite attribute
appVersionstringApplication version
contextsobjectBuilt-in context entities
anonymousTrackingboolean | objectEnable anonymous tracking (no user identifiers)
pluginsArray<any>Snowplow plugins
activityTrackingobjectPage ping configuration
globalContextsArray<any>Global context entities

Mapping

Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.

PropertyTypeDescriptionMore
contextArray<object>Context entities to attach to this event
snowplowobjectSnowplow-specific settings override

Examples

add to cart

Event
Mapping
Out

checkout step

Event
Mapping
Out

context loop

Event
Mapping
Out

init

Event
Out

page view

Event
Out

product view

Event
Mapping
Out

promo view

Event
Mapping
Out

structured event

Event
Mapping
Out

transaction

Event
Mapping
Out

User identity and privacy

Cross-session user stitching

Use userId to link events across sessions when users log in. The ID is set once via Snowplow's setUserId() on the first event where the value resolves:

Loading...

The userId setting supports walkerOS mapping syntax:

  • 'user.id' from walkerOS user object (recommended)
  • 'globals.user_id' from globals

Anonymous tracking

Enable anonymous tracking for privacy-focused collection or before consent:

Loading...

Runtime privacy controls

Control tracking modes at runtime using exported utility functions:

Loading...

Track GDPR/CCPA consent events using Snowplow's Enhanced Consent plugin. The destination automatically reacts to walkerOS consent events and calls the appropriate Snowplow consent methods.

Prerequisites: load the Enhanced Consent plugin via the plugins setting or include it in your Snowplow script bundle.

Loading...
OptionTypeDescription
requiredstring[]walkerOS consent groups to check
basisForProcessingstringGDPR basis: consent, contract, legal_obligation, vital_interests, public_task, legitimate_interests
consentUrlstringPrivacy policy URL
consentVersionstringPolicy version
domainsAppliedstring[]Domains where consent applies
gdprAppliesbooleanWhether GDPR applies

The destination maps walkerOS consent state to Snowplow methods:

walkerOS consent stateSnowplow method
All required scopes grantedtrackConsentAllow
All required scopes deniedtrackConsentDeny
Partial consent (mixed)trackConsentSelected

Media tracking

Track video and audio playback events using Snowplow's media tracking schemas. The destination supports all media events and contexts.

Basic usage

Loading...

Media mapping configuration

Configure media event mappings with the MEDIA_SCHEMAS constants:

Loading...

Ad tracking

Track video advertisements with pre-roll, mid-roll, and post-roll events:

Loading...

Available media schemas

SchemaDescriptionUse case
PLAYPlayback startedVideo/audio play
PAUSEPlayback pausedUser pauses content
ENDPlayback endedVideo/audio completed
SEEK_START / SEEK_ENDUser seekingScrubbing timeline
BUFFER_START / BUFFER_ENDBuffering stateLoading content
QUALITY_CHANGEVideo quality changedAdaptive streaming
FULLSCREEN_CHANGEFullscreen toggledUser interaction
VOLUME_CHANGEVolume changedUser adjustment
PERCENT_PROGRESSProgress milestone25%, 50%, 75% markers
ERRORPlayback errorError tracking
AD_BREAK_START / AD_BREAK_ENDAd breakPre/mid/post-roll
AD_START / AD_COMPLETE / AD_SKIPIndividual adAd impressions

Schema constants

The package exports pre-defined Snowplow schema URIs for use in custom mappings:

Loading...

Advanced configuration

Tracker settings

Loading...

Activity tracking (page pings)

Loading...

Page view tracking

Snowplow's native trackPageView() can be triggered either on init or via a walkerOS event. Both options require explicit configuration. If neither trackPageView nor pageViewEvent is set, no automatic page view tracking occurs.

Loading...
Loading...

Plugins

Load Snowplow plugins for automatic tracking. Supports both URL-based plugins (sp.js) and npm BrowserPlugin instances:

Loading...

The enable method is derived automatically from the plugin name (LinkClickTrackingPlugin becomes enableLinkClickTracking). Override with enableMethod if needed.

Global contexts

Attach context entities to all events. Supports static objects and dynamic generator functions:

Loading...

Testing with Snowplow Micro

Use Snowplow Micro for local development:

Loading...

Configure the destination with collectorUrl: 'http://localhost:9090' and view events at http://localhost:9090/micro/ui.

💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)