Show HN: Walker.js – open-source, vendor-agnostic autotrack library
github.com
github.com
The walker.js is an open-source javascript library that makes every user interaction on a website trackable, directly through your markup instead of writing extra code. Think of alpine.js but for tracking. It’s a self-describing descriptive language for all kinds of web products.
We’re vendor-agnostic which means that walker.js works nicely with the Google Stack (GA4, GTM) but also with other destinations like Segment, Amplitude, etc. The walker runs across your site to build a complete event context on the fly. The general usage is fully based on HTML attributes that you can define yourself, based on your needs.
<div data-elb="ENTITY" data-elb-ENTITY="KEY:VALUE" data-elbaction="TRIGGER:ACTION" />
It takes care of the best initialization of the triggers and capturing of properties to build the events and handles some more helpful contextual information (timing, globals, user ID, etc.).
We plan to develop further destinations and a consent mode for GDPR-compliant setups. We’re always on the hunt for challenging use cases!
Find out more: Github: https://github.com/elbwalker/walker.js
Docs: https://docs.elbwalker.com/sources/web/implementation
Brief event concept: https://www.elbwalker.com/blog/elbwalker-event-concept
Our goal is to make front-ends trackable the minute they are built, so tracking doesn’t get pushed to the back anymore and won’t break as easily as today.
document.querySelector('[data-elb="product"][data-elbaction="click:add"]').click();
Also good to test correct implementations with Selenium e.g. It's way more robust than working with CSS classes. Just work with the attribute selectors.
Curious to understand more about the use case you’re describing.