Analytics Tag
One script, your API key — and your storefront starts emitting structured analytics events automatically.
What gets captured
- Pageviews and page-leave timing
- Product impressions, clicks, variant selections
- Add to cart, remove, quantity changes, wishlist
- Search, filter, sort
- Checkout funnel: started, coupon applied, completed
- Order placed, payment initiated / completed / failed
- Form errors and abandonment
- Engagement: scroll depth, time on page, rage clicks, dead clicks
- Web vitals: LCP, INP, CLS, FCP, TTFB
- JavaScript errors and slow API responses
All without writing tracker calls — just add data-p-* attributes on the elements you already have.
Bundle size
analytics.min.js — 6.9 kB gzipped.
Next steps
- Quick Start — get the tag on a page in under a minute
- Tag attributes —
data-api-keyand friends - Auto-capture —
data-p-*conventions, with examples - JavaScript API —
track,identify,group - Event reference — every event the tag knows
- Privacy & consent — DNT, opt-out, no PII auto-capture