@elbwalker/client-web
v0.0.1
Published
Lightweight & vendor-agnostic tracking implementation layer for data-collection by simply adding attributes to your markup.
Downloads
55
Maintainers
Readme
@elbwalker/client-web (formerly walker.js)
Why you need it: Unify your data collection efforts across different departments with the web client, formerly known as walkerOS. This package offers a vendor-agnostic approach to front-end user event tracking, enabling you to collect high-quality, consent-aware data for analytics, marketing, and more.
Usage
You can implement all sorts of front-end user events. From product and UX events like "promotion view", or filter usage, etc. to e-commerce actions like product add to carts or order complete events. The walkerOS handles all trigger initializations and race conditions, builds the events with context, and distributes them based on consent states and mapping definitions to any destinations.
To get started take a look at our detailed documentation.
Basic Example
Here's a simple HTML example to demonstrate how tagging works:
<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>
This generates an event like:
{
event: 'promotion view', // Combination of entity and action
data: {
// Arbitrary set properties with the data-elb-promotion attribute
name: 'Setting up tracking easily',
category: 'analytics',
},
context: {
// Related properties defined with the data-elbcontext attribute
test: ['engagement', 0] // Value and order
},
custom: {}, // Additional custom data for individual setups
globals: {
// General Properties defined with the data-elbglobals attribute
language: 'en'
},
user: {
// Stored user ids (manually added once)
id: 'userid',
device: 'cookieid',
session: 'sessionid',
},
nested: [], // All nested entities within the promotion
consent: { functional: true }, // Status of the consent state(s)
id: '1647261462000-01b5e2-5', // Timestamp, group & count of the event
trigger: 'visible', // Name of the trigger that fired
entity: 'promotion', // Entity name
action: 'view', // Entity action
timestamp: 1647261462000, // Time when the event fired
timing: 3.14, // How long it took from the page load to trigger the event
group: '01b5e2', // Random group id for all events on a page
count: 2, // Incremental counter of the events on a page
version: {
// Helpful when working with raw data
client: '1.0.0', // Semantic version of the used client
tagging: 42, // A version number of the then used tagging status
},
source: {
// Origins of the event
type: 'web', // Source type of the event
id: 'https://github.com/elbwalker/walkerOS', // Source id of the event's origin (url)
previous_id: 'https://www.elbwalker.com/' // Previous source id (referrer)
},
walker: true, // Flag to filter events
}
Who This Package is For
This package is intended for companies, agencies, freelancers, and in-house teams who aim to work in a data-driven manner. It serves the needs of data engineers, product owners, analysts, marketers, and developers all at the same time.
Installation
TBD
Tagging
TBD
Destinations
TBD
Consent
TBD