Giter Club home page Giter Club logo

managed-component-snowplow's Introduction

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.

managed-component-snowplow's People

Contributors

daggett206 avatar

Watchers

 avatar

managed-component-snowplow's Issues

Bug when getting pageVariables in zaraz environment

At present, webcm and zaraz seem to be out of sync with each other, when working with pageVariables. To demonstrate this, we can look at the results obtained by invoking the following code:

event.client.set(key, value, {scope: 'page'});
  1. webcm: in the case of webcm, only string values are set, as shown in the accompanying screenshot:
    image

  2. zaraz: however, in the case of zaraz, the values are JSON.stringified, resulting in string values with unnecessary quotes, as shown in the accompanying screenshot:
    image

This inconsistency is causing errors in the current flow, as we expect to receive only string values without quotes from event.client.get().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.