TrimStats for SaaSB2B & Indie SaaS (Marketing + Web App)

One sub-2 KB analytics stack from first blog click to recurring MRR.

Unify cookie-less marketing analytics, 2 to 8 step signup funnels, weekly retention cohorts, signed payment-webhook revenue, and UI click friction without juggling three bloated tools.

Imtiaz Rayhan
Imtiaz RayhanCo-Founder & Lead Engineer, DotCamp & TrimStats
Tested against SaaS Teams & live TrimStats APIs
Seeded demo workspace
TrimStats Weekly Retention Cohorts dashboard displaying 18.4k returning visitors, 45% to 51% Week 1 retention, and an 8-week ClickHouse cohort gridTrimStats Weekly Retention Cohorts dashboard displaying 18.4k returning visitors, 45% to 51% Week 1 retention, and an 8-week ClickHouse cohort grid
Measure 2 to 12 week SaaS user retention directly in ClickHouse across persistent first-party and identified users alongside up to 730-day individual timelines.
Direct answer

Why do SaaS teams choose TrimStats over stitching separate traffic, funnel, and replay tools?

TrimStats gives SaaS teams one 1.96 KB gzipped EU-hosted analytics stack covering cookie-less acquisition, opt-in first-party IDs and identify(userId) for logged-in apps, 2 to 8 step funnels, 2 to 12 week retention cohorts, 90-day Stripe/Paddle/Polar revenue attribution, UI click friction, and rolling 7-day anomaly alerts on every tier from $17/month.

Step-by-step setup for SaaS Teams

Copy-paste implementation verified against the live TrimStats tracker and collector APIs.

  1. 1

    Deploy the 1.96 KB script across marketing pages and docs

    Start strictly cookie-less on your landing pages, comparison pages, and documentation so EU visitors never hit an analytics consent wall.

    Marketing site <head>html
    <script defer src="https://collect.trimstats.com/t.js" data-site="pk_live_your_key"></script>
  2. 2

    Connect logged-in SaaS sessions with identify(userId)

    After authentication in your app, pass an opaque database user UUID (never a raw email) to link pre-signup touchpoints with post-signup activation and weekly retention cohorts.

    app-session.tsts
    // Call after login or session hydration with an opaque user UUID
    if (session?.user?.id) {
    window.trimstats?.('identify', session.user.id);
    }
  3. 3

    Wire payment webhooks and multi-step onboarding funnels

    Connect Stripe, Paddle, or Polar webhooks for 90-day ClickHouse revenue attribution, then define up to 50 conversion goals and 2 to 8 step funnels covering visit -> signup -> activated -> paid.

  4. 4

    Enable opt-in UI friction and founder anomaly digests

    Add data-friction="true" on high-value pricing and checkout flows to catch rage clicks and dead clicks, and subscribe founders to weekly digests plus deduplicated 6-hour anomaly alerts.

Recommended taxonomy

High-signal custom events to track for SaaS Teams

Fire any event with window.trimstats?.('event', name, props) and attach it to conversion goals or multi-step ClickHouse funnels.

Event nameWhen to fireSample properties
signup_startedVisitor submits or starts the account creation form.{"source":"pricing_cta"}
signup_completedNew SaaS account is provisioned in PostgreSQL.{"auth_provider":"email"}
workspace_createdUser creates their first project, site, or workspace inside the app.{"step":1}
onboarding_completedUser reaches your core aha moment (for example first verified beacon or integration).{"minutes_from_signup":4}
checkout_startedWorkspace owner clicks Upgrade to launch Stripe, Paddle, or Polar checkout.{"target_plan":"growth"}
team_member_invitedAccount owner invites a teammate, signaling multi-seat expansion.{"role":"admin"}
Seeded demo workspace
TrimStats Revenue Attribution report showing SaaS MRR attributed to Hacker News, Google, GitHub, and high-converting landing pagesTrimStats Revenue Attribution report showing SaaS MRR attributed to Hacker News, Google, GitHub, and high-converting landing pages
Tie recurring subscription payments, renewals, and refunds straight back to the blog post, comparison page, or referrer that acquired the user.

Weekly SaaS retention cohort matrix tracks post-signup stickiness over 5 weeks

Percentage of persistent users returning in Weeks 0 through 5 (seeded acme.dev demo)

%
CohortW0W1W2W3W4W5
Oct 19 (1,420)100%44%36%31%28%26%
Oct 26 (1,580)100%46%38%33%30%27%
Nov 02 (1,690)100%48%39%34%31%29%

Week 1 retention improved from 44% to 48% across consecutive onboarding releases, with Week 4 stabilizing near 30%.

Methodology: Seeded acme.dev SaaS cohort matrix illustrating ClickHouse weekly retention tracking for persistent first-party and identified users.

Source: TrimStats seeded demo workspace (acme.dev)
View chart data table
LabelOct 19 (1,420)Oct 26 (1,580)Nov 02 (1,690)
W0100%100%100%
W144%46%48%
W236%38%39%
W331%33%34%
W428%30%31%
W526%27%29%

SaaS Teams analytics FAQ

Implementation details, privacy trade-offs, and event-quota answers.

Can we run cookie-less on our marketing site and identified mode inside our SaaS app?
Yes. TrimStats supports dual-mode identity per site and optional window.trimstats("identify", userId) inside authenticated app routes. You keep zero cookies on public marketing pages while measuring full multi-week retention cohorts and timelines for signed-in accounts.
Should we pass customer email addresses into window.trimstats("identify")?
No. Always pass an opaque internal database UUID or customer ID (up to 128 characters) rather than raw email addresses or personal names so your analytics store remains free of unnecessary PII.
Are funnels, cohorts, revenue webhooks, and anomaly alerts locked behind enterprise pricing?
No. Every TrimStats plan from Starter ($17/month, 100k events) to Growth ($44/month, 1M events) and Scale ($134/month, 5M events) includes every analytics capability. You only scale by monthly event volume, site count, and retention days.
How does TrimStats help with enterprise SaaS customer security reviews and GDPR?
TrimStats hosts ClickHouse and Valkey on Hetzner in Nuremberg, Germany and PostgreSQL on Neon in Frankfurt, Germany, discards raw visitor IPs in memory, drops bot traffic before ingestion, and provides a GDPR Article 28 Data Processing Agreement.
What happens to our SaaS data if a Product Hunt or Hacker News launch spikes traffic?
Every plan includes a 20% soft grace buffer above its monthly event limit plus proactive usage alerts at 80% and 100%, so sudden launch spikes never silently drop analytics data.
How does TrimStats compare to PostHog or Plausible for a B2B SaaS stack?
TrimStats weighs 1.96 KB gzipped versus roughly 45 to 55 KB for PostHog and bundles ClickHouse funnels, weekly cohorts, signed Stripe/Paddle/Polar revenue webhooks, and opt-in UI friction at $17 to $134/month instead of Plausible Business tiers ($39 to $259/month).
Imtiaz Rayhan
Integration guide verified 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: Code snippets, custom event payloads, and webhook contracts for SaaS Teams are verified against the live TrimStats tracker (1.96 KB gzipped) and collector schema as of 2026-11-30.

Instrument SaaS Teams in under 60 seconds

Start on Starter ($17/month for 100,000 monthly events), with cookie-less privacy defaults and full access to revenue webhooks, funnels, cohorts, and UI friction.

Verified against live TrimStats APIs and tracker bundle.