Privacy-First Analytics

Cookie-less analytics under 2 KB hosted entirely in Germany.

Start strictly cookie-less with zero consent banners and daily rotating salts, then opt in per site to first-party IDs only when you need multi-day cohorts.

Imtiaz Rayhan
Imtiaz RayhanCo-Founder & Lead Engineer, DotCamp & TrimStats
Specs verified against production TrimStats source
Seeded demo workspace
TrimStats Overview dashboard in cookie-less mode showing 42 live visitors, 29,991 unique visitors, 36.8% bounce rate, and 2m 28s active visit timeTrimStats Overview dashboard in cookie-less mode showing 42 live visitors, 29,991 unique visitors, 36.8% bounce rate, and 2m 28s active visit time
  1. 1
    Real-time cookie-less counter: Serves live active visitor counts from Valkey while running strictly cookie-less with zero browser storage.
  2. 2
    True active engagement: Bounce rate requires <= 1 pageview and < 10 seconds of active tab dwell so single-page readers count fairly.
Full real-time analytics, visibility-aware engagement time, and click-to-filter breakdowns running with zero browser cookies or localStorage writes.
Direct answer

How does TrimStats measure unique visitors without cookies or storing IP addresses?

TrimStats defaults to strict cookie-less mode using zero cookies and zero localStorage. On EU servers in Germany, the Fastify collector hashes each visitor transiently in memory with SHA-256 using a 32-byte salt rotated every 24 hours UTC, discards raw IP addresses immediately without writing them to disk, and ships in 1.96 KB gzipped.

Tracker payload
1.96 KB gzipped

1,735 B Brotli, 3,478 B minified, zero dependencies.

Default browser storage
0 bytes

Zero cookies and zero localStorage writes in default cookie-less mode.

Salt rotation
24 hours

32-byte server-side salt rotates every UTC day so past hashes cannot be reversed.

EU data residency
Germany

ClickHouse and Valkey in Nuremberg (Hetzner); PostgreSQL in Frankfurt (Neon).

Why teams switch to TrimStats for privacy-first analytics

Built directly on ClickHouse, Fastify, and a sub-2 KB browser script to remove legacy analytics blind spots.

Cookie consent banners cut off 30% to 60% of EU analytics data

Cookie-based trackers force intrusive consent walls across European visitors and blind your reporting whenever users decline marketing cookies.
TrimStats cookie-less mode writes nothing to the visitor device and never builds cross-site ad profiles, removing the need for an analytics cookie banner by default.

Rigid cookie-less tools block SaaS cohort and multi-day attribution

Purely cookie-less analytics cannot link a visitor who reads a post on Monday and upgrades to a paid plan next Thursday.
TrimStats offers an explicit per-site First-Party ID toggle (and identify() for logged-in apps) so you pick cookie-less for marketing sites and persistent journeys only where needed.

Heavy tag managers degrade Core Web Vitals on every pageview

Bundled analytics tags add 40 KB to 100+ KB of JavaScript, trigger extra CORS preflight requests, and delay hydration on mobile networks.
TrimStats loads a single 1.96 KB deferred script and transmits beacons as text/plain via navigator.sendBeacon to eliminate CORS OPTIONS preflights.
01 / Capability

Dual-mode identity controlled both client-side and server-side

Every site starts in strict cookie-less mode. Switching to First-Party ID mode requires both enabling the server-side toggle in Site settings and setting data-mode="first-party" on your tag.

  • Without the server-side toggle enabled, the collector ignores client visitor IDs and stays strictly cookie-less.
  • First-party mode uses only two localStorage keys (_ts_vid and _ts_attr) on your own origin.
  • Supports consent-gated activation so visitors who decline cookies fall back cleanly to cookie-less measurement.
Seeded demo workspace
TrimStats Privacy and Identity settings comparing default zero-storage Cookie-less mode against optional First-Party ID mode with Germany EU hostingTrimStats Privacy and Identity settings comparing default zero-storage Cookie-less mode against optional First-Party ID mode with Germany EU hosting
Choose per site between zero-storage cookie-less measurement and opt-in first-party IDs for multi-week cohorts and 90-day attribution.
02 / Capability

Measured under 2 KB gzipped with an automated CI size ceiling

TrimStats enforces script weight as a first-class engineering invariant. Every tracker build runs packages/tracker/scripts/check-size.mjs to guarantee t.js stays well inside its hard budget.

  • Actual built bundle: 1,735 B Brotli, 1,956 B gzipped, 3,478 B raw minified.
  • Automated CI check fails any build exceeding 3,072 bytes (3 KiB) gzipped.
  • Tracks pageviews, SPA history navigation, outbound links, downloads, and custom events with zero runtime dependencies.

Verified TrimStats t.js bundle size across transfer encodings vs CI budget

Measured directly from built packages/tracker/dist/t.js in kilobytes (KB)

KB
Brotli transfer (dist/t.js)(1,732 bytes)
1.73 KB
Gzip transfer (dist/t.js)(1,964 bytes)
1.96 KB
CI hard gzip ceiling(3,072 bytes (3 KiB))
3.07 KB
Uncompressed minified JS(3,508 bytes)
3.51 KB

The complete universal tracker ships at 1.96 KB gzipped (1.73 KB Brotli), well below the enforced 3 KiB CI ceiling.

Methodology: Measured directly from compiled packages/tracker/dist/t.js using gzip level 9, brotli, and packages/tracker/scripts/check-size.mjs.

Source: TrimStats repository build artifact (packages/tracker/dist/t.js)
View chart data table
LabelBundle size
Brotli transfer (dist/t.js)1.73 KB
Gzip transfer (dist/t.js)1.96 KB
CI hard gzip ceiling3.07 KB
Uncompressed minified JS3.51 KB
03 / Capability

EU data residency with transparent sub-processors and DPA

All analytics telemetry is ingested and stored in Germany with zero third-party ad-tech data sharing and built-in bot filtering before events reach ClickHouse or billing counters.

  • ClickHouse analytics, Valkey live cache, and Fastify ingestion run on Hetzner Online GmbH in Nuremberg, Germany.
  • Account metadata, site settings, and goals live on Neon PostgreSQL in Frankfurt, Germany.
  • Raw visitor IPs are read in memory solely for daily hashing and country lookup, then discarded immediately.
index.htmlhtml
1<script
2 defer
3 src="https://collect.trimstats.com/t.js"
4 data-site="pk_live_your_key"
5></script>
Default cookie-less snippet requires zero consent configuration.

Privacy-First Analytics FAQ

Direct answers on implementation, privacy controls, quotas, and data accuracy.

Do I need a cookie consent banner with TrimStats default mode?
No in default cookie-less mode. TrimStats stores zero cookies, zero localStorage, and zero persistent device identifiers, hashing visitors with a server-side salt rotated every 24 hours UTC. If you opt in to First-Party ID mode, you are responsible for any consent notice required in your jurisdiction.
Does TrimStats store visitor IP addresses on disk?
No. The Fastify collector reads the incoming IP address transiently in memory to compute the daily salted SHA-256 visitor hash and resolve the country code, then discards the IP immediately without writing it to ClickHouse, PostgreSQL, or disk logs.
Where is TrimStats customer and analytics data hosted?
Analytics storage (ClickHouse), real-time caching (Valkey), and beacon ingestion run on Hetzner Online GmbH servers in Nuremberg, Germany. Relational workspace and site configuration tables run on Neon PostgreSQL in Frankfurt, Germany.
Can I exclude my own team visits from analytics without cookies?
Yes. Any developer or marketer can set localStorage.setItem("trimstats_ignore", "1") in browser DevTools to silence tracking in their own browser. Automated webdriver sessions and known bots are also dropped automatically before billing.
What happens to analytics accuracy if I switch a site from cookie-less to first-party mode?
Existing historical metrics remain intact. New visits from browsers with data-mode="first-party" enabled begin persisting _ts_vid and _ts_attr in localStorage, unlocking 2 to 12 week retention cohorts, 30-day multi-step funnels, and 90-day ClickHouse revenue attribution.
Does TrimStats provide a GDPR Article 28 Data Processing Agreement (DPA)?
Yes. TrimStats publishes its GDPR Article 28 Data Processing Agreement at /legal/dpa listing every EU sub-processor (Hetzner Online GmbH in Nuremberg and Neon PostgreSQL in Frankfurt), and teams can email contact@trimstats.com for a countersigned copy.
What are the mathematical limits of pure cookie-less analytics?
Because TrimStats rotates its 32-byte salt every 24 hours UTC, pure cookie-less mode cannot link the same anonymous browser across separate UTC days for multi-week retention cohorts or 30-day buying journeys. That is why TrimStats offers an explicit per-site First-Party ID toggle when multi-day attribution is required.
Imtiaz Rayhan
Engineered & documented by
Imtiaz Rayhan (Co-Founder & Lead Engineer, DotCamp & TrimStats)

Co-founder of DotCamp LLC in Brooklyn, NY and lead engineer of TrimStats. Ships privacy-first web analytics, ClickHouse pipelines, and WordPress plugins used on 115,000+ active sites.

  • • Architect of the TrimStats 1.96 KB gzipped browser tracker, Fastify collector, and ClickHouse MergeTree pipeline
  • • Co-founder of DotCamp LLC (est. 2019), creator of Ultimate Blocks (50,000+ installs), WP Table Builder (50,000+ installs), Tableberg, and OptimizeCamp
  • • WordPress.org plugin & theme developer since 2016 with 1,200+ community support replies and 5M+ cumulative plugin downloads

Verification standard: All script sizes (1.96 KB gzipped), plan limits, and dashboard behaviors on this page are verified directly against the TrimStats repository and seeded acme.dev workspace as of 2026-11-30.

Try privacy-first analytics with one 1.96 KB gzipped script

Every TrimStats tier from Starter ($17/month) through Scale ($134/month) includes full access to revenue attribution, UI friction, anomaly insights, funnels, and cohorts.

Verified against live TrimStats specifications.