Skip to main content

walker.js

Walker.js is a pre-built walkerOS application that combines both the browser and dataLayer sources with the collector and a default dataLayer destination into a pre-build package. It's designed for users who want instant web tracking without complex setup or configuration.

Installation

Option 1: NPM Package

Loading...

Option 2: CDN

Loading...

Basic Setup

Add this script before walker.js loads to queue events during initialization:

Loading...

2. Include Walker.js

Loading...

3. Configure Destinations

Loading...

Configuration Options

Walker.js supports multiple configuration approaches with different priorities:

  1. Script tag data-elbconfig (highest priority)
  2. window.elbConfig (default fallback)
  3. Manual initialization (when run: false)

Settings

PropertyTypeDescriptionMore
elbstringGlobal function name for event tracking
namestringGlobal instance name
runbooleanAuto-initialize walker.js on load
browserobjectBrowser source configuration. Set to false to disable. See browser configuration section below for details.
dataLayerobjectDataLayer source configuration. Set to true for defaults or object for custom config. See dataLayer configuration section below.
collectorobjectCollector configuration including destinations and consent settings. See collector configuration section below.

Browser Source Settings

PropertyTypeDescriptionMore
browser.runbooleanAuto-start DOM tracking
browser.sessionbooleanEnable session tracking
browser.scopestringDOM element scope for tracking
browser.pageviewbooleanEnable automatic page view events

DataLayer Settings

PropertyTypeDescriptionMore
dataLayerbooleanEnable dataLayer integration with defaults
dataLayer.namestringDataLayer variable name
dataLayer.prefixstringEvent prefix for dataLayer events

Collector Settings

PropertyTypeDescriptionMore
collector.consentobjectDefault consent state
collector.destinationsobjectDestination configurations. See destinations documentation for available options.

Full Configuration Object

Loading...

Inline Configuration

Configure directly in the script tag using simple key:value pairs:

Loading...

Named Configuration Object

Use a custom configuration object name:

Loading...

Usage

Automatic DOM Tracking

Walker.js automatically tracks events based on HTML data attributes:

Loading...

For detailed information on data attributes, see the Browser Source documentation.

Manual Event Tracking

Use the global elb function for manual tracking:

Loading...

DataLayer Integration

Walker.js can integrate with existing dataLayer implementations:

Loading...

Advanced Features

Async Loading & Event Queueing

Walker.js handles async loading gracefully with automatic event queueing:

Loading...

Build Variants

Walker.js provides multiple build formats for different environments:

  • walker.js - Standard IIFE bundle for browsers
  • index.es5.js - GTM-compatible ES2015 build
  • index.mjs - ES modules for modern bundlers
  • index.js - CommonJS for Node.js environments

Programmatic Usage

Use walker.js programmatically in applications:

Loading...

Destination Configuration

Configure multiple destinations for your events:

Loading...

For comprehensive destination options, see the Destinations documentation.

Troubleshooting

Common Issues

Events not firing: Check that walker.js loaded and configuration is valid.

Missing events: Ensure event queueing function is added before walker.js.

Configuration not applied: Verify data-elbconfig points to the correct object name.

API Reference

Factory Function

Loading...

Creates a new walker.js instance with the provided configuration.

Instance Properties

  • collector - The walkerOS collector instance
  • elb - Browser push function for event tracking

Utility Functions

Loading...

Walker.js combines all these components into a single, easy-to-use package perfect for getting started with walkerOS quickly.

💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.