Revenue Attribution

See which channels and pages generate paying customers.

Replace fragile thank-you-page scripts with cryptographically signed Stripe, Paddle, Polar, and custom webhooks joined to 90-day ClickHouse visitor journeys.

Imtiaz Rayhan
Imtiaz RayhanCo-Founder & Lead Engineer, DotCamp & TrimStats
Specs verified against production TrimStats source
Seeded demo workspace
TrimStats Revenue Attribution dashboard showing $32,753 attributed revenue, 559 orders, $1.21 revenue per visitor, and top sources led by google.com and chatgpt.comTrimStats Revenue Attribution dashboard showing $32,753 attributed revenue, 559 orders, $1.21 revenue per visitor, and top sources led by google.com and chatgpt.com
  1. 1
    Attribution model toggle: Switch instantly between 90-day first-touch and last-touch attribution without reprocessing webhooks.
  2. 2
    Channel revenue breakdown: Compare exact dollar revenue and order counts across referrers, UTM campaigns, and landing pages.
Net revenue, AOV, revenue per visitor, and buyer conversion rate broken down by referrer, UTM campaign, and landing page with one-click first-touch or last-touch toggling.
Direct answer

How does TrimStats attribute SaaS revenue without fragile checkout pixels?

TrimStats attributes revenue by verifying signed server-to-server webhooks from Stripe, Paddle, Polar, or custom backends and joining each transaction to the buyer's 90-day ClickHouse journey. One-time payments, subscription renewals, and refunds deduplicate by external transaction ID, normalize across 13 currencies into USD, and bypass ad blockers or dropped thank-you redirects.

ClickHouse lookback
90 days

Joins payments to historical visitor touchpoints across multi-week SaaS buying cycles.

Native providers
4 webhooks

Stripe, Paddle, Polar, and custom HMAC endpoints verified cryptographically.

FX normalization
13 currencies

Automatically converts EUR, GBP, JPY, CAD, and more into clean USD totals.

Included plans
All tiers

Revenue attribution ships on Starter ($17) through Scale ($134) with zero enterprise paywall.

Why teams switch to TrimStats for revenue attribution

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

Thank-you-page pixels drop orders silently

Client-side conversion scripts miss buyers using ad blockers, closed tabs after Stripe Checkout, or failed browser redirects.
Signed server-to-server webhooks arrive directly from your payment processor, recording every paid invoice and refund even when the browser never returns.

Renewals and refunds skew marketing ROI

Browser events fire once at initial signup and never update when a customer churns, requests a refund, or renews six months later.
TrimStats reconciles subscription_new, subscription_renewal, one_time, and negative refund events deduplicated by external_tx_id.

Traffic volume hides which posts actually sell

A viral article can drive 10,000 visits and zero paid upgrades while a 400-visit comparison page generates $10,000 in annual plans.
Revenue per Visitor (RPV) and Landing Page revenue cards expose which content and referrers convert into real cash.
01 / Capability

Cryptographically signed webhooks for Stripe, Paddle, Polar, and custom backends

Attach the lightweight browser snapshot returned by window.trimstats.attribution() to checkout metadata. When payment settles, TrimStats verifies the provider signature and records the transaction in ClickHouse.

  • Verifies stripe-signature, paddle-signature, Standard Webhooks (Polar), and custom HMAC headers.
  • Webhook signing secrets are stored encrypted at rest in PostgreSQL.
  • Falls back gracefully to checkout metadata even when a visitor browsed in strict cookie-less mode.
checkout-session.tsts
1const attribution = window.trimstats?.attribution?.() ?? {};
2
3await fetch('/api/checkout', {
4 method: 'POST',
5 headers: { 'content-type': 'application/json' },
6 body: JSON.stringify({ priceId: 'price_growth_monthly', attribution }),
7});
Forward the browser attribution snapshot into checkout metadata.
Seeded demo workspace
TrimStats webhook configuration table showing verified Stripe, Polar, and Paddle endpoints next to a chronological visitor timeline attributing a $290 subscription to Hacker NewsTrimStats webhook configuration table showing verified Stripe, Polar, and Paddle endpoints next to a chronological visitor timeline attributing a $290 subscription to Hacker News
Each signed payment webhook attaches directly to the customer timeline so you can inspect the exact landing page, dwell time, and custom events that preceded checkout.
02 / Capability

Connect top-of-funnel traffic directly to verified payment conversions

Track the full visitor-to-customer conversion funnel from initial landing page through pricing evaluation, account creation, and verified server-side checkout completion.

  • Evaluate 2 to 8 ordered funnel steps with native ClickHouse queries.
  • Switch between first_touch and last_touch attribution across referrers, UTM sources, campaigns, landing pages, and countries.
  • Compare Revenue per Visitor (RPV) and Average Order Value (AOV) side by side.

SaaS conversion funnel from initial visit to verified Stripe webhook

30-day seeded acme.dev demo cohort tracked across 5 conversion stages

visitors
  1. 1Landing page visit
    12,480 visitors100.0%
  2. 2Viewed /pricing
    3,420 visitors27.4%-72.6% drop
  3. 3Completed signup
    612 visitors4.9%-82.1% drop
  4. 4Started checkout
    384 visitors3.1%-37.3% drop
  5. 5Verified webhook payment
    264 visitors2.1%-31.3% drop

Tracking server-verified payments as the final step reveals exact drop-off between checkout start (384) and completed payment (264).

Methodology: Seeded 30-day acme.dev demo dataset illustrating TrimStats 5-step funnel evaluation joined with webhook payment completion.

Source: TrimStats seeded demo workspace (acme.dev)
View chart data table
LabelVisitors
Landing page visit12,480 visitors
Viewed /pricing3,420 visitors
Completed signup612 visitors
Started checkout384 visitors
Verified webhook payment264 visitors
03 / Capability

13-currency normalization and automatic refund deduplication

Global SaaS products charge customers in USD, EUR, GBP, JPY, and regional currencies. TrimStats preserves original currency amounts alongside normalized usd_cents so dashboard rollups stay accurate.

  • Supports USD, EUR, GBP, CAD, AUD, CHF, JPY, INR, BDT, BRL, SGD, SEK, and NZD out of the box.
  • Handles zero-decimal currencies such as JPY automatically without off-by-100 reporting errors.
  • Deduplicates retried webhook deliveries cleanly on external_tx_id.

Revenue Attribution FAQ

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

Does revenue attribution work in default cookie-less mode?
Yes. Even in default cookie-less mode, window.trimstats.attribution() captures the initial referrer, landing page, and UTM parameters for the current visit so checkout metadata attributes same-session purchases. Enabling optional first-party ID mode or calling identify() extends ClickHouse journey lookup across up to 90 days.
Which payment providers does TrimStats support natively?
TrimStats includes native signature verification and payload parsers for Stripe, Paddle, and Polar, plus a custom HMAC webhook endpoint for any proprietary billing system or regional payment gateway. All four options are included on every plan tier starting at $17 per month.
How does TrimStats handle subscription renewals and refunds?
TrimStats distinguishes one_time purchases, subscription_new events, subscription_renewal invoices, and negative refund transactions. Every event is deduplicated by external_tx_id so payment provider retries never double-count revenue and refunds accurately reduce net revenue.
Can I compare first-touch and last-touch attribution without changing code?
Yes. TrimStats stores the visitor event history in ClickHouse and computes first_touch or last_touch attribution dynamically at query time. You can switch attribution models inside the Revenue dashboard at any time without re-sending historical webhooks.
Does revenue attribution add extra size to the browser tracker script?
No. The attribution() helper is already compiled inside the single 1,964-byte gzipped t.js script, and webhook verification happens entirely on the Fastify collector server with zero extra browser JavaScript.
How does TrimStats webhook attribution compare to GA4 or Plausible revenue tracking?
GA4 and Plausible rely primarily on browser-fired purchase events that drop whenever ad blockers or closed checkout tabs interrupt the thank-you redirect. TrimStats verifies signed server webhooks directly from Stripe, Paddle, Polar, or custom backends and reconciles renewals and refunds over a 90-day ClickHouse lookback.
How does TrimStats secure Stripe, Paddle, and Polar webhook secrets?
TrimStats verifies raw-body cryptographic signatures (stripe-signature, paddle-signature, Standard Webhooks, or custom HMAC-SHA256) before parsing payloads, stores signing secrets encrypted at rest in Neon PostgreSQL (Frankfurt, EU), and rejects spoofed or replayed requests.
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 revenue attribution 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.