Skip to content

Simple & lightweight tracking implementation layer based on attributes

License

Notifications You must be signed in to change notification settings

sumup-oss/walker.js

 
 

Repository files navigation

walker.js

Walker.js is a first-party event tracker for simplified and compliant data collection. Standardized, agnostic & flexible. With walker.js you can capture user events in the browser and send them to any destination - just by setting HTML attributes. Become independent from locked-in analytics systems and set up reliable tracking the moment you design your front end.

Request Feature · Report Bug · Say hello

elbwalker Documentation

🤓 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 walker.js 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.

  1. Installation
  2. Tagging
  3. Destinations
  4. Consent

Basic example

Tagging a page with

<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>

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
  },
  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
    walker: 1.6, // used walker.js version
    config: 42, // a custom configuration version number
  },
  source: {
    // Origins of the event
    type: 1, // Source type of the event (1=Web)
    id: 'https://github.com/elbwalker/walker.js', // Source id of the event's origin (url)
    previous_id: 'https://www.elbwalker.com/' // Previous source id of the event's origin (referrer)
  },
  walker: true, // flag to filter events
}

that destinations automatically translates into proper implementations.

Contact

Send us an email if you have any questions or feedback at [email protected]

Want to send the data directly to your Google BigQuery instance? Check out our hosted version at https://www.elbwalker.com/

(back to top)

About

Simple & lightweight tracking implementation layer based on attributes

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.2%
  • JavaScript 5.3%
  • HTML 2.5%