6 categories · 25 guides

TrimStats Documentation

Everything you need to install the lightweight tracker on any stack, instrument custom events and goals, understand privacy-first identity, and connect server-verified revenue webhooks.

Drop-in installation snippet

Paste inside your HTML <head> tag. SPAs, outbound links, downloads, and active visit time work automatically.

Customize with interactive builder
index.htmlhtml
<script defer src="https://collect.trimstats.com/t.js" data-site="pk_live_your_key"></script>

Start with a core guide

Browse by category

Structured guides organized from first install to production webhooks and HTTP reference.

Common implementation questions

Quick answers on installation verification, Content Security Policy headers, and billing webhooks.

How fast can I install and verify the TrimStats tracker script?
Paste one deferred <script> tag with your data-site key inside your HTML <head>, deploy, and confirm a 202 POST request to collect.trimstats.com in your browser Network tab. Live visitors appear in the dashboard within seconds using a 300-second active window.
Does the TrimStats tracker work with strict Content Security Policy (CSP) headers?
Yes. Allow https://collect.trimstats.com in script-src and connect-src (or proxy through your own domain). The tracker uses zero inline eval calls, zero third-party sub-dependencies, and sends beacons with text/plain to avoid CORS preflight OPTIONS requests.
Which server-side payment webhooks are documented for revenue attribution?
TrimStats documents complete signature verification and checkout metadata wiring for Stripe, Paddle Billing, Polar.sh (Standard Webhooks), and custom HMAC-SHA256 endpoints across /docs/stripe-webhook, /docs/paddle-webhook, /docs/polar-webhook, and /docs/custom-webhooks.
Technical support

Need help with a custom setup or webhook?

Reach out if you are setting up a first-party reverse proxy, strict CSP policy, or custom billing integration.

Documentation maintained by Imtiaz Rayhan against the live TrimStats tracker and collector APIs.