Script
You can install walker.js as a script or module. 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.
- Script
- Module
The script creates a global walkerjs
and elb
function.
<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"
it adds the dataLayer
as a default destination and
starts automatically. With data-version
the current tagging version
can be set.
In both cases class="walkerjs"
is required to identify the
script tag and check for the attributes.
Load the .mjs
module-file directly from the CDN or your own server.
<script type="module">
window.elb = (...args) => {
(window.elbLayer = window.elbLayer || []).push(...args);
};
const WalkerJs = (
await import(
'https://cdn.jsdelivr.net/npm/@elbwalker/walker.js@latest/dist/index.mjs'
)
).default;
window.walkerjs = WalkerJs({});
</script>
Be aware of the latest
version in the URL, better use a specific version like
3.0.0
It's recommended to use the externally hosted version only for demo purposes, not in production
If you need professional support with your walkerOS implementation, check out our services.