Tracking script reference
The canonical PureStats tracker is pf.js. The default installation only needs data-domain; site-level behavior is loaded from PureStats automatically.
Basic snippet
<script defer src="https://purestats.io/pf.js" data-domain="example.com"></script>
Attributes
| Attribute | Required | Description |
|---|---|---|
data-domain | Yes | Canonical PureStats site domain. |
data-api | No | Custom event endpoint. Defaults to PureStats. |
data-config-api | No | Custom tracker configuration endpoint. Derived from data-api by default. |
data-consent-mode | No | Explicit client-side consent mode override. Prefer Site Settings. |
data-respect-dnt | No | Explicit Do Not Track override. Prefer Site Settings. |
data-exclude-paths | No | Client-side path exclusions for advanced deployments. Prefer Site Settings. |
data-cross-domain | No | Explicit cross-domain stitching override. Prefer Site Settings. |
data-allowed-domains | No | Explicit comma-separated alias list for cross-domain stitching. Prefer Site Settings. |
data-linker | No | Enables or disables the optional cross-domain linker parameter. |
Event endpoint
The tracker sends events to:
https://purestats.io/api/event
The API validates the domain or alias, path exclusions, consent state, quota state and bot/spam scoring before storing the event.
Before the first event, the tracker also reads:
https://purestats.io/api/tracker-config
That response applies the current Site Settings without requiring extra attributes in the script tag.
Browser support
The tracker is designed for modern browsers. If a browser blocks JavaScript, analytics events cannot be collected.
Versioning
PureStats builds the minified tracker from source and exposes version/checksum metadata for release checks. Use pf.js as the public integration file.