Skip to main content

Configuration

There are several configuration options when creating a walker.js instance:

const walkerjs = Walkerjs({
dataLayer: true, // Add the dataLayer destination
dataLayerConfig: {
consent: 'functional', // Require functional consent
},
elb: 'elb', // Assign the elb function to the window
globals: {
tagged: false, // A static global attribute
},
pageview: true, // Trigger a page view event with each run
run: true, // Automatically start running
session: {
storage: true, // Use the storage for session detection
consent: 'marketing', // Require marketing consent to access storage
length: 60, // Session length in minutes
},
tagging: 1, // Current version of the tagging
});
OptionTypeDescription
consentobjectInitial consent states
dataLayerbooleanAdds a dataLayer destination if enabled
dataLayerConfigobjectConfig for dataLayer destination, e.g. for consent
defaultbooleanAdd dataLayer destination and run automatically
elbstringName of assign the elb function to the window
elbLayerobjectPublic elbwalker API for async communication
globalsobjectStatic attributes added to each event
instancestringName of the walker.js instance to assign to the window
pageviewbooleanTrigger a page view event by default
prefixstringAttributes prefix used by walker
runbooleanAutomatically start running
sessionfalse or
SessionConfig
Configuration for session detection
taggingnumberCurrent version of the tagging setup
userobjectSetting the user ids including id, device, and session
note

During a run you can still use globals and tagging to update the configuration.

info

If you need professional support with your walkerOS implementation, check out our services.