/snowplow

Snowplow managed component for WebCM and Zaraz

Primary LanguageTypeScript

Snowplow Managed Component

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.

Released under the Apache license. PRs welcome! code style: prettier

🚀 Quickstart local dev environment

  1. Make sure you're running node version >=17.
  2. Install dependencies with npm i
  3. Run unit test watcher with npm run test:dev

⚙️ Tool Settings

Settings are used to configure the tool in a Component Manager config file

App ID string required

appId, application id, official documentation.

Namespace string required

namespace, the tracker namespace.

Endpoint string required

endpoint, the collector endpoint.

Platform string required

platform, for now it is hardcoded as "web"

🧱 Fields Description

Fields are properties that can/must be sent with certain events

Email string

customerEmail, if set, will be sent to the collector endpoint as uid field.

Fields that are part of a trackStructEvent, official documentation

Action string

event.payload.ecommerce.name, name of the event.

Label string

payload.order_id || payload.product_id || payload.checkout_id, label of the event.

Property string

payload.currency, property of the event.

Value string

payload.value || payload.price || payload.total || payload.revenue, value of the event.