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, and event mapping.

Where This Fits

Snowplow is a web destination in the walkerOS flow:

Initializes the Snowplow tracker, loads plugins, enables activity tracking (page pings), and sends self-describing events with ecommerce context entities.

Installation

Loading...

Setup

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 reference

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

Example

Settings
Loading...
Result
Loading...

Event Mapping

For custom event mapping (mapping.entity.action.settings):

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

User Identity & 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
Loading...

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

Configure Snowplow tracker behavior including cookie settings and built-in contexts:

Loading...

Activity Tracking (Page Pings)

Enable activity tracking to measure user engagement through page pings:

Loading...

Page View Tracking

Configure how Snowplow's native trackPageView() is triggered:

Option 1: Auto-track on init

Loading...

Option 2: Track via walkerOS event

Loading...

Option 3: Custom event name

Loading...
note

Both settings require explicit configuration - there is no implicit default. If neither trackPageView nor pageViewEvent is set, no automatic page view tracking occurs.

Plugins

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

Loading...

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

Global Contexts

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

Loading...

Full Replacement Example

Replace native Snowplow tracker calls with a single walkerOS configuration:

Loading...

Mapping examples

tip

The code examples are interactive. You can edit the code to generate your individual event mapping.

Learn more about Snowplow Ecommerce tracking.

Product View

Map your walkerOS event to get a Snowplow product_view ecommerce event with product context.

Event
Loading...
Mapping
Loading...
Result
Loading...

Add to Cart

Map your walkerOS event to get a Snowplow add_to_cart ecommerce event with product, cart, page, and user context entities.

Event
Loading...
Mapping
Loading...
Result
Loading...

Transaction

Map your walkerOS event to get a Snowplow transaction ecommerce event with transaction context.

Event
Loading...
Mapping
Loading...
Result
Loading...

Promotion Visible

Map your walkerOS event to get a Snowplow promo_view ecommerce event with promotion context.

Event
Loading...
Mapping
Loading...
Result
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 Professional Support?
Need professional support with your walkerOS implementation? Check out our services.