Tracker
MITTracker script
A ~1 KB cookieless script. One tag before </head>. No cookies, no localStorage identifiers, no fingerprints.
v5.js is the browser half of Vector 5. It counts people who execute JavaScript. Crawlers that never run JS are the middleware's job.
Install
index.html
<script defer data-domain="example.com"
src="https://analytics.example.com/js/v5.js"></script>The API serves the script at /js/v5.js (5-minute cache). You can also vendor packages/tracker/dist/v5.js and point data-api at your ingest host.
Framework recipesNext.js, WordPress, Shopify, Astro, Remix, SvelteKit, Webflow.Attributesdata-domain, data-api, data-hash.Custom eventswindow.v5 and data-v5-event.SPAspushState is already hooked.
What it sends
| Field | JSON key | Source |
|---|---|---|
| Domain | d | data-domain or location.hostname |
| Event name | n | pageview unless you pass one |
| URL | u | location.href |
| Referrer | r | document.referrer |
| Hostname | h | location.hostname |
| Screen width | w | screen.width |
| Props | p | Optional object from window.v5 |
| UTMs | utm_* | From location.search if present |
The server derives referrer host, country, device, browser, and OS, then discards the IP. The script never sends a visitor id.
Automatic events
- Pageviews on load,
pushState,replaceState, andpopstate. - Hash changes when
data-hash="true". - Outbound Link on clicks to another host.
- File Download for
pdf,zip,csv,xlsx,docx,png,mp4. - `data-v5-event` on any clicked element.
Ignore yourself
devtools
localStorage.v5_ignore = '1'The script reads that key once at boot and exits. It is the only localStorage access, and it is opt-in on your machine. Ignore visits.
Something off? Open an issue · Edit on GitHub

