Browser — @millimetric/track
@millimetric/track — the browser SDK. ~1.8 KB gzipped.
Install (one of two ways)
A. Drop-in <script> snippet — for static sites, Webflow, Framer, marketing pages
<script> snippet — for static sites, Webflow, Framer, marketing pages<script async
src="https://api.millimetric.ai/v1/a.js"
data-key="pk_live_…"
data-host="https://api.millimetric.ai"></script><button onclick="window.mm.track('clicked_pricing', { plan: 'pro' })">
See plans
</button>B. npm — for React / Next / Vue / Svelte / Solid
Public API
init(options)
init(options)track(event, properties?)
track(event, properties?)identify(userId, traits?)
identify(userId, traits?)page(name?, properties?)
page(name?, properties?)flush()
flush()getAnonymousId() / setAnonymousId(id)
getAnonymousId() / setAnonymousId(id)What's captured automatically
SPA navigation
Batching & sendBeacon
DNT / Global Privacy Control
Cookies
Bundle size
Build
Size
Examples
React
Next.js (App Router)
Vanilla HTML with explicit tracking
How a.js is served
a.js is servedBuild & deploy
Point your hostname at it
Last updated
Was this helpful?