Skip to main content

Script

To quickly try it out, you can also load the latest default walker.js configuration via CDN. Add the script tag to the <head> of your HTML file.

The walker.js script creates a global walkerjs and elb automatically.

<script
async
class="walkerjs"
src="https://cdn.jsdelivr.net/npm/@elbwalker/walker.js@latest/dist/walker.js"
data-default="true"
data-version="1"
></script>
<script>
function elb() { (window.elbLayer = window.elbLayer || []).push(arguments); }
</script>

Using data-default="true" adds the dataLayer as a default destinations and starts the walker automatically. With data-version the current tagging version can be set. In both cases class="walkerjs" is required to identify the script tag to check for the attributes.

In most of the examples, you'll find the imported elb function. The hosted browser version also comes with it but should be loaded async. Add the following snippet manually in addition to the script:

info

Be aware of the latest version in the URL, better use a specific version like 3.0.0

note

It's recommended to use the externally hosted version only for demo purposes and not in production.