Ecommerce
caution
You are reading documentation for an outdated version. Hereβs the latest one!
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.