Simplified implementation of snowplow library for tracking web events.
Supports working with cookies (_id, _ses) and sending ecommerce events.
Find out more about Managed Components here for inspiration and motivation details.
- Make sure you're running node version >=17.
- Install dependencies with
npm i
- Run unit test watcher with
npm run test:dev
Settings are used to configure the tool in a Component Manager config file
appId
, application id, official documentation.
namespace
, the tracker namespace.
endpoint
, the collector endpoint.
platform
, for now it is hardcoded as "web"
Fields are properties that can/must be sent with certain events
customerEmail
, if set, will be sent to the collector endpoint as uid
field.
Fields that are part of a trackStructEvent, official documentation
event.payload.ecommerce.name
, name of the event.
payload.order_id || payload.product_id || payload.checkout_id
, label of the event.
payload.currency
, property of the event.
payload.value || payload.price || payload.total || payload.revenue
, value of the event.