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
| Documentation |
addItem | Documentation |
trackTrans | Documentation |
trackAddToCart | Documentation |
trackRemoveFromCart | Documentation |
Context
This plugin does not add any additional data to context of an event.