Skip to main content

Ecommerce

Installation

  • npm install @snowplow/browser-plugin-ecommerce
  • yarn add @snowplow/browser-plugin-ecommerce
  • pnpm add @snowplow/browser-plugin-ecommerce

Initialization

import { newTracker, trackPageView } from '@snowplow/browser-tracker';
import { EcommercePlugin, addTrans, addItem, trackTrans } from '@snowplow/browser-plugin-ecommerce';

newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ EcommercePlugin() ],
});

Functions

addTransDocumentation
addItemDocumentation
trackTransDocumentation
trackAddToCartDocumentation
trackRemoveFromCartDocumentation

Context

This plugin does not add any additional data to context of an event.

Was this page helpful?