Skip to main content

Web Client walker.js

Source code Package

Walker.js is an open library to capture user events and send them to any web destination. It is created to improve data richness and make tracking implementation robust and scalable.

Basic idea

The basic idea of walker.js is to set up a complete tracking with HTML attributes. Use the elb-attributes data-elb, data-elbaction, data-elb-*, data-elbcontext, and data-elbglobals for tagging.

Add some tags in your HTML...

<body data-elbglobals="language:en">
<div data-elbcontext="test:engagement">
<div data-elb="promotion" data-elbaction="visible:view">
<h1 data-elb-promotion="name:Setting up tracking easily">
Setting up tracking easily
</h1>
<p data-elb-promotion="category:analytics">Analytics</p>
</div>
</div>
</body>

... and your web event is built on the fly:

{
event: 'promotion view', // Name as a combination of entity and action
data: {
// Arbitrary properties related to the entity
name: 'Setting up tracking easily',
category: 'analytics',
},
context: {
// Provides additional information about the state during the event
test: ['engagement', 0] // Key, [value, order]
},
globals: {
// General properties that apply to every event
language: 'en'
},
custom: {}, // Additional space for individual setups
user: {
// Contains user identifiers for different identification levels
// Require consent and set manually for sessions building and cross-device
id: 'us3r1d',
device: 'c00k131d',
session: 's3ss10n1d',
},
nested: [],
consent: { functional: true }, // Status of the granted consent state(s)
id: '1647261462000-01b5e2-5', // Timestamp, group & count of the event
trigger: 'visible', // Name of the trigger that fired
entity: 'promotion', // The entity name involved in the event
action: 'view', // The specific action performed on the entity
timestamp: 1647261462000, // Time when the event fired
timing: 3.14, // Duration how long it took to trigger this event
group: '01b5e2', // Random identifier for all events during a run
count: 2, // Incremental counter of the events in the same run
version: {
// Information about the used implementation setup
client: 'X.X.X', // Semantic version of the used client
tagging: 42, // A version number of the then-used tagging status
},
source: {
// Details about the origin of the event
type: 'web', // Source type of the event (also app, server, or custom one)
id: 'https://github.com/elbwalker/walkerOS', // Source of the event's origin
previous_id: 'https://www.elbwalker.com/' // Previous source (like referrer)
}
}
info

Learn more about the event model.