3.6.4 • Published 6 months ago
@surfside/surfside-events
Licence
ISC
Version
3.6.4
Deps
3
Size
940 kB
Vulns
0
Weekly
0
Surfside Digital Analytics
Setup repository
clone repo
npm install -g @microsoft/rush
rush update
Package Installation
With npm:
npm install @surfside/surfside-events
Usage
Use the available functions from this package to track to all trackers which have been initialized with the SurfsideEvent plugin:
import { SurfsideEvent, addProduct, addPromo, setCommerceAction } from '@surfside/surfside-events';
addProduct({
id: 'P12345',
name: 'Blue T-Shirt',
list: 'Search Results',
brand: 'The T-Shirt Company',
category: 'Apparel/T-Shirts',
variant: 'Black',
quantity: 1,
});
addPromo({
id: 'PROMO_1234',
name: 'Summer Sale',
creative: 'summer_banner2',
position: 'banner_slot1',
});
setCommerceAction({ action: 'purchase' });