Skip to main content

The script

Script reference

For someone who already has TrueStat installed and now wants to configure it.

For someone who already has TrueStat installed and now wants to configure it.

PageCovers
Script optionsEvery attribute, what it does, its default
Tracking custom eventsThe HTML attribute way and the JavaScript way, plus every limit
Identity and cookieless modeThe three identity modes, how to switch, and what each costs in accuracy
Localhost and developmentTesting without polluting your real numbers
Subdomains and multiple domainsOne dashboard across several hostnames
Single-page appsRoute changes and hash routing
Serving the script from your own domainThe proxy guide, per platform — and the one thing you must not get wrong
Content Security PolicyWhat to allow, and where to put it

The two things people get wrong

Custom event limits are enforced, not advisory. An event whose name has a capital letter in it is rejected and the event is lost. The limits are listed exactly in Tracking custom events, and they are worth reading before you write your first window.truestat() call rather than after.

A proxy that does not forward the visitor's IP breaks your visitor counts completely — not partially. Read the first section of Serving the script from your own domain before you set one up.

Was this page helpful?

Last updated August 28, 2026