Revenue
Connect your Stripe account, and your dashboard shows what you earned and which sources brought the buyers. On every plan, with no cookies.
Connect Stripe
- On your site’s analytics page, press Revenue in the sidebar.
- In Stripe, open API keys and choose Create restricted key.
- Set Events and Invoices to Read, and Webhook Endpoints to Write. Leave the rest at None.
- Paste the key and press Connect.
Payments from the last 30 days come in straight away. New ones arrive within seconds; without Webhook Endpoints: Write, we check every 10 minutes.
A secret key (sk_) is refused: it can do anything in your account. A restricted key can only read what you tick.
Credit sales to visits
Once Stripe is connected, your pages load a 0.5 KB add-on with our script. Other sites never load it.
Payment Links work as they are. When a visitor clicks a buy.stripe.com link on your site, the add-on gives it a random reference as client_reference_id, unless the link has one. When the sale comes in, the reference names the visit, even if the buyer never comes back. A click in the moment before the add-on loads goes untagged, and its sale is credited only if the buyer comes back.
Buyers who come back count too. Under the Payment Link’s After payment, redirect to a page of yours, ending in:
?session_id={CHECKOUT_SESSION_ID}
Checkout Sessions you create on your server: pass the same reference.
// When the buyer presses Buy
const ref = window.simplytics && simplytics('ref');
fetch('/create-checkout-session', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ ref }),
});
// Your server (Node)
const session = await stripe.checkout.sessions.create({
// ...your line items, mode and URLs
client_reference_id: req.body.ref || undefined,
});
simplytics('ref') answers once the add-on has loaded, a moment after the page opens. Before that, or for a visitor who opted out of counting, it returns nothing: send nothing then, and a buyer who comes back is still matched.
A sale is credited to the buyer’s first visit that day: its source, campaign and landing page, and the country and device it came from. Renewals count in the totals, never by source.
What we keep
- Daily totals: revenue, refunds, payments, and new and renewal sales.
- New revenue by source, campaign, country, device and landing page.
- For 60 days, a one-way code for each Stripe payment, so a sale is never counted twice and a refund comes off the right source.
- A checkout reference until its sale arrives, at most 48 hours.
Never the buyer’s name, email or card. Your key is stored encrypted.
Each currency is counted on its own, in the currency you charge. One Stripe account connected to two sites counts its payments on both.
A refund counts on the day it is made, so a refund of a sale from before you connected can make a day’s net negative.
If your dashboard is public, visitors see revenue too, without the tabs of cards you hide. To hide it, untick Revenue in What visitors see.
Disconnect
Disconnect deletes our webhook endpoint in your Stripe account, and your key. Revenue already counted stays until you press Delete revenue. Deleting the site or your account deletes all of it.
API and AI assistants
An API key with revenue:read reads the same numbers from GET /api/v1/revenue/{domain} (API) and the get_revenue tool (MCP server). A public site’s revenue needs no key. No key can connect a payment account.