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.