Revenue attribution
Revenue attribution for Stripe, Paddle, Lemon Squeezy, Polar and Dodo: paste one key and every sale, renewals included, is credited to the visit that earned it.
Revenue is the thing trckable has that the other free, self-hostable analytics do not. It is not a "revenue event" you send from the browser: it is the provider's own signed webhooks, an idempotent ledger, and reconciliation against the provider's API every six hours.
Setting it up
Step by step for your provider, with what to expect on the dashboard: Stripe, Paddle, Lemon Squeezy, Polar and Dodo Payments. The overview is revenue attribution.
Settings → Payments → choose a provider → paste a restricted API key (read access, plus webhook endpoints). trckable then creates the webhook endpoint itself, with a fixed event list (and a pinned API version where the provider versions its API), and stores the signing secret encrypted.
Manual webhook setup is still there if you would rather not hand over a key: trckable gives you the URL and you paste the signing secret back.

Any other checkout
Not on Stripe, Lemon Squeezy, Polar, Paddle or Dodo? Settings → Payments → Anything else gives you a webhook URL and a signing secret, and your own code posts each sale to it, whatever took the money: a shop, another gateway, a checkout you wrote.
POST /webhooks/custom/<connection>
Trckable-Timestamp: 1758579600
Trckable-Signature: v1=<hex HMAC-SHA256 of "<timestamp>.<body>", keyed with the secret>
{"id": "evt_1", "type": "payment", "at": "2026-09-22T10:00:00Z",
"payment": {"id": "ord_1", "amount": 4900, "tax": 800, "currency": "EUR",
"kind": "one_time", "email": "them@company.com",
"visitor": "<the trckable_vid cookie's value>"}}typeispayment,refundordispute, with a matchingpayment,refund(id,payment_id,amount,currency) ordisputeobject (the same, plusstatus:open,wonorlost).- Amounts are in minor units (cents), tax included; revenue is amount minus
tax, as for every provider.
kindisone_time,subscription(a first payment) orrenewal, withcustomer_idandsubscription_idso renewals follow the first visit. - Times may be RFC 3339, unix seconds or milliseconds. The timestamp header must be within five minutes of the server's clock.
- The same
idsent twice is one event, and events may arrive in any order."test": truekeeps a payment out of the real numbers.
Connecting a sale to a visit
In order of preference:
- Checkout metadata. The browser script adds the visitor id to hosted checkout links when they are clicked — Stripe Payment Links, Lemon Squeezy, Polar and Dodo links need nothing at all.
- Checkouts you create on your server. Pass the visitor through:
import { getIds, checkoutFields } from 'trckable/server'
const ids = getIds(request.headers.get('cookie'))
await stripe.checkout.sessions.create({ ...params, ...checkoutFields('stripe', ids, 'subscription') })Paddle runs in the browser: Paddle.Checkout.open({ items, customData: { trckable_vid } })
with the value of the trckable_vid cookie.
- The customer graph. Once a customer is linked, their renewals follow the visit that won them, forever.
Attribution
A sale belongs to the visitor's last non-direct visit within 90 days before it. A renewal belongs to the visit that started the subscription, not to whatever they happened to be doing the day the card was charged.
First-touch is a switch in the dashboard: the visit that found them rather than the one that closed them. It changes who gets the credit, never the total.
Attribution is resolved when you ask, not when the payment arrives. That is why a refund that arrives before its payment, or a webhook replayed out of order, still ends up right.
What "revenue" means here
Amount paid, excluding tax, before fees, converted at the European Central Bank's rate on the day of the payment.
- Refunds are recorded per refund id. A cumulative
amount_refundedfield is never summed, so a partial refund followed by another is not counted twice. - Disputes are recorded as opened, won or lost.
- Test and sandbox payments are kept separate and excluded from your real numbers. There is a toggle to look at them.
Reconciliation
Webhooks get lost. Lemon Squeezy, for instance, retries three times over about two and a half minutes and then gives up. Every six hours trckable pulls recent payments from each provider's API and fills anything missing, through the same inbox and the same idempotent path — so a dropped webhook is a delay, not a hole.
trckabled payments list # connections and their health
trckabled payments sync [site] [days] # pull now
trckabled payments reprocess <site> # rebuild the ledger from stored webhooksThe ledger can always be rebuilt, because every webhook is stored raw and fsynced before it is acknowledged.
What you see
Revenue, conversion and revenue-per-visitor next to your traffic, in the key numbers; revenue as a plot of its own under the visitors on the main chart, with its own axis; revenue and conversion columns on every breakdown row; Sources that pay, with revenue per visitor and the change in revenue on each row; and, in Explore, Pages that sell and Latest buyers.
Click the Revenue number and the main plot shows revenue instead, in money: columns (a glowing line once at least 80% of the days have sales) with the comparison period dashed on the same axis. The hover card gives the day's revenue with its sales, split into new and renewal amounts, revenue per visitor and conversion.
Hover a source and the money trail highlights where those visitors went and what they paid.
The webhook inbox holds personal data
Raw provider payloads contain your customers' emails, names and addresses. They
are on your own server and they make a rebuild of the ledger possible, so they
are kept for a while: once a payload has been read into the ledger and is 30 days
old, its body is emptied (TRCKABLE_PAYMENT_NOTICE_DAYS changes the 30, and 0
keeps them; a site whose retention is shorter is held to that). What the ledger
keeps is the amount, the date, the ids and a keyed hash of the email. After that,
a rebuild applies the payloads that are left on top of the ledger and does not
reset it. Erasing a person (Data & privacy → Answer a data request) removes their
payloads that remain, and deleting the site removes all of them. You should know
they are there, which is why the privacy paragraph mentions them.
Social accounts (Channels)
See the views of your YouTube, Instagram and Threads accounts beside your sites: what is read, what is kept, and how to create the app keys.
Revenue from Gumroad and PayPal
Connect Gumroad or PayPal to see which traffic pays: where each key and ID comes from, how a sale reaches its visitor, and what is counted.