Your Stripe dashboard tells you how much you earned. It cannot tell you which campaign earned it. Connecting Stripe joins the two: a payment arrives, and the dashboard already knows where that visitor came from.
What you get
Revenue beside your traffic, in the same date range and the same channels
Which channel brought the money — often not the one bringing the visitors
New and renewal revenue separately, so growth is not hidden inside recurring income
Refunds and chargebacks shown as they happen
Connecting
Create a restricted key
In TrueStat, open your site's Settings → Integrations and press Create a key in Stripe. The link opens Stripe with the eight permissions already ticked, so you only need to confirm and copy the key.
Seven are read-only. The eighth lets us register one webhook so payments reach us as they happen — it cannot change your prices, your products, or take payments.
Paste it back
Return to the Integrations tab and paste the key. We check every permission before saving; if one is missing, the screen names it.
Add two lines to your checkout
This is the step that makes attribution work. See below.
Linking a payment to a visitor
Without this, payments still appear — but under unattributed, because nothing connects the payment to the visit that led to it.
Our script stores a visitor id in a cookie. Pass it to Stripe when you create the checkout:
const session = await stripe.checkout.sessions.create({
// …your existing options
metadata: { ts_vid, ts_vs },
payment_intent_data: { metadata: { ts_vid, ts_vs } },
subscription_data: { metadata: { ts_vid, ts_vs } },
});All three, not just the first. Stripe does not copy metadata between
related objects. The top-level metadata reaches the checkout event and stops
there — it never lands on the payment or the invoice.
subscription_data is the one that matters most: Stripe copies it onto every
future invoice, so a renewal two years from now is still attributed to the
campaign that won the customer. No cookie survives that long.
Read the two values from the cookies our script sets:
const ts_vid = req.cookies.ts_vid;
const ts_vs = req.cookies.ts_vs;Using Payment Links instead
If you use Stripe Payment Links and write no server code, add this to the success URL under After payment:
https://yoursite.com/thank-you?session_id={CHECKOUT_SESSION_ID}Our script reads it when the visitor lands back on your site.
This attributes the first payment only. Renewals happen without the visitor returning, so there is no page load to read anything from. If you sell subscriptions, use the checkout metadata above.
What the numbers mean
Revenue is what settled into your Stripe account. If a customer pays in euros and your account is in dollars, Stripe converts it and we record the converted figure — so the total matches your Stripe dashboard exactly.
Refunds are shown separately, not subtracted. A refunded payment still happened. Stripe lists revenue and refunds as separate lines and so do we.
Unattributed revenue still counts. It appears in the total with its own line, because a total that disagrees with Stripe is a total you cannot trust. The gap is usually checkout code missing the metadata above.
When revenue starts
From the moment you connect. Earlier payments stay in Stripe and are not imported.
They could not be attributed anyway: the visitor id that links a payment to a campaign did not exist before the integration did, so every imported row would sit permanently under unattributed. Your Stripe dashboard still has that history.
The same applies to subscriptions that began before you connected. Their renewals arrive but produce no revenue row, because the campaign that won them was never recorded.
Reading revenue in another currency
In your site's Settings → Integrations, pick any currency for reporting. Amounts are stored in your account currency and converted at today's rate when the dashboard draws them, so the underlying figures never change.
The account currency stays the default, because it is the figure that matches Stripe.
Disconnecting
Your site's Settings → Integrations → Disconnect removes our webhook from your Stripe account and deletes the revenue collected here. Your Stripe data is untouched.
Reconnecting starts counting from that moment; the gap is not backfilled.