Web analytics usually forces a frustrating trade-off.
Pick a heavyweight suite like Google Analytics 4 or PostHog and you end up shipping 35 to 135 KB of JavaScript, cookie banners, and dashboards built for enterprise marketing teams. Pick a lightweight privacy tracker and you lose the things a SaaS builder actually needs — server-verified revenue attribution, multi-step funnels, retention cohorts, and UX friction signals.
I got tired of choosing between speed and real product insight. So I built TrimStats.
Why I built another analytics tool
Running a growing portfolio of WordPress plugin sites, SaaS apps, and content hubs at DotCamp meant wanting one clean dashboard that answers three questions without slowing down a single page: what changed, what broke, and what drove revenue.
Three specific frustrations pushed me to build it from scratch:
- Browser revenue pixels lie. Client-side checkout scripts get blocked by ad blockers, drop cross-device conversions, and completely miss subscription renewals, upgrades, and refunds.
- AI search traffic is still a blind spot. Earlier this year I wrote about how hard it is to track AI search traffic — digging through raw server logs for crawler user-agents and building manual referrer filters. That belongs natively inside your analytics tool, not in a weekend grep script.
- Session replay is overkill for basic UX bugs. Most of the time you don't need a 60 KB recorder filming every keystroke. You just want to know which button is triggering rage clicks or dead clicks on mobile.
What fits inside 1.96 KB
The core engineering constraint for TrimStats was keeping the entire universal tracker (t.js) ultra-lean without stripping out SaaS capabilities. Right now t.js measures 1,964 bytes gzipped (1,732 bytes over Brotli, zero dependencies, deferred load) — roughly 20× smaller than base GA4 — enforced by a hard 3 KiB CI ceiling. It sends events via navigator.sendBeacon with text/plain so browsers skip CORS preflight round trips.
Here's what runs behind that single script:
- Cookie-less by default (EU-hosted) — zero cookies, zero
localStorage, raw IPs discarded in memory, and 24-hour rotating SHA-256 daily salts. Need cross-session SaaS journeys? Flip on optional per-site first-party ID mode andidentify(). - Signed revenue attribution webhooks — cryptographically verified server-to-server webhooks for Stripe, Paddle, Polar.sh, and custom HMAC endpoints, joined across a 90-day ClickHouse visitor journey with first-touch and last-touch models and 13 normalized currencies.
- 39 AI crawlers & quoted citations — automatically classifies AI indexing, training, and answer crawlers at zero billable quota cost, while tracking AI assistant referrals (ChatGPT, Perplexity, Claude, Gemini, Copilot) and auto-capturing
#:~:text=cited passages. - ClickHouse funnels & retention cohorts — 2–8 step conversion funnels via
windowFunnel(), 2–12 week retention cohorts, 50 custom goals per site, and visibility-aware active dwell time that ignores hidden background tabs. - Opt-in UI click friction & anomaly alerts — lightweight rage-click, dead-click, and 90% scroll tracking without text capture or replay bloat, plus automated rolling 7-day anomaly scans every 6 hours.
Under the hood and pricing
TrimStats runs on ClickHouse, Fastify, Valkey, Neon PostgreSQL, and Next.js, hosted in Germany (EU). I'm already dogfooding it across my own properties — including FramesField and TrimStats itself.
I also wanted pricing to stay dead simple. Plans run from $17/mo (100K events, 5 sites) to $134/mo (5M events, 100 sites), with two months free on annual billing. Every feature — revenue webhooks, funnels, cohorts, AI crawler tracking, UI friction, and anomaly alerts — is unlocked on every tier. Bots and AI crawler hits are dropped before billing, there are zero per-seat fees, and every plan gets a 20% spike grace buffer so a launch day never silently drops data.
Try it out
If you want fast, privacy-first analytics that ties traffic directly to revenue without loading a bloated tag manager, take a look at TrimStats — or click around the live interactive demo with no signup required.