Script configuration
Updated October 17, 2026
The script weighs under 1 KB compressed and loads with defer, after the page.
<script defer data-domain="example.com" src="https://statsdot.com/js/script.js"></script>
Attributes
| Attribute | Meaning |
|---|---|
data-domain |
Required. The site as you added it in Statsdot, without www. |
data-auto="false" |
Turns off the automatic tracking of outbound links and file downloads. |
What it sends
For each page view: the page address without query string, the referring site's domain, the UTM tags of the landing page and the screen width (to tell desktop, tablet and mobile). Events add a name and an optional label. The request goes to https://statsdot.com/api/collect. Nothing is stored on the visitor's device: no cookies, no local storage, no fingerprinting.
Single page apps
The script listens to the browser's history API, so client-side navigation in React, Vue, Next.js, Nuxt, Livewire (wire:navigate) or Inertia counts every page without extra code.
When it does nothing
- On
localhostand other local addresses. - In automated browsers that announce themselves (
navigator.webdriver). - When you have excluded your own visits, see Exclude your own visits.
Known bots and crawlers are also left out on the server, see the AI crawler directory.
Your own domain
To get past blockers that list analytics domains, serve the script from your own domain with a proxy: see Serve the script from your own domain. The script sends visits next to where it was loaded from.
Custom events from code
window.statsdot.track('Signup');
window.statsdot.track('Download', 'Price list 2026');
More in Events and goals.