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
});
Option | Type | Description |
---|---|---|
consent | object | Initial consent states |
dataLayer | boolean | Adds a dataLayer destination if enabled |
dataLayerConfig | object | Config for dataLayer destination, e.g. for consent |
default | boolean | Add dataLayer destination and run automatically |
elb | string | Name of assign the elb function to the window |
elbLayer | object | Public elbwalker API for async communication |
globals | object | Static attributes added to each event |
instance | string | Name of the walker.js instance to assign to the window |
pageview | boolean | Trigger a page view event by default |
prefix | string | Attributes prefix used by walker |
run | boolean | Automatically start running |
session | false or SessionConfig | Configuration for session detection |
tagging | number | Current version of the tagging setup |
user | object | Setting 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.