Documentation

ThunderStats docs

Privacy-first web analytics: a ~2 KB script, no cookies, no consent banner. Track from the browser, from your server, or both.

Quickstart

Create a site in the dashboard, then drop this into your <head>. Replace the site ID with your own.

index.html
<script defer src="https://t.thunderstats.com/ts.js" data-site-id="YOUR_SITE_ID"></script>

That is the whole install. Pageviews appear in your dashboard within a few seconds, including single-page-app route changes.

Where to go next

How the tracking works

ThunderStats identifies a visit without storing anything on the device and without keeping the IP address.

  • No cookies and no local storage. Nothing is written to the browser, so no consent banner is required for the analytics itself.
  • The IP address is never stored. It is used in-request to look up an approximate country and city, and as one input to a session hash. Then it is discarded.
  • Sessions are a salted daily hash. A visitor is identified by an HMAC of their IP, user agent, your site ID, and the current UTC date. It rotates every day and cannot be reversed or matched across sites.

See the privacy policy for the full list of what is and is not collected.

Reading these docs with an AI assistant

These docs are published in a machine-readable form as well. Point a coding agent at llms.txt for an index, or llms-full.txt for every page inlined as plain markdown in one request.

Next: Install the tracker →