Skip to content
Payment providers

Stripe revenue analytics by traffic source

3 min read · Updated · By the Reveata team

Short answerReveata reads your Stripe payments, invoices, subscriptions, refunds and lost disputes through a read-only connection, then credits each payment to the visit that brought the buyer, so revenue sits next to traffic in every report.

Stripe tells you how much money came in. It does not tell you whether that money came from a Google search, a newsletter or a post on Reddit. Connecting Stripe to Reveata joins the two halves: the payment from Stripe and the visit from your website.

What you get when you connect Stripe

  • Revenue by channel, source, campaign and page. Every report that shows visitors also shows revenue, customers, conversion rate and revenue per visitor.
  • Subscriptions. MRR, trials, upgrades, downgrades and cancellations come from your Stripe subscriptions. See Stripe subscription analytics.
  • Refunds and disputes. A refund is booked as negative revenue on the day it happens, against the source of the original payment. A dispute that closes lost is treated like a refund.
  • Built-in goals. Payments become goals such as billing:paid and billing:renewed, so a funnel can end at "Paid" (subscription goals).
  • Twelve months of history. On connect, Reveata imports the last 12 months of payments, refunds, lost disputes and subscriptions.

How the connection works

There are two ways to connect, and both give Reveata the same data:

  1. A restricted key. Reveata's Create the key in Stripe button opens Stripe's form with read access to Payment Intents, Invoices, Subscriptions, Checkout Sessions, Refunds, Charges, Customers and (optionally) Disputes already ticked. With write access to Webhook Endpoints, Reveata creates its own webhook. See Stripe: connect with a restricted key.
  2. Connect with Stripe, when the card offers it: you approve read-only access in Stripe and no webhook needs adding. See Stripe: Connect with Stripe.

New payments arrive within seconds through the webhook. If the webhook is not working yet, Reveata still reads Stripe on a schedule (every hour without a webhook, every six hours with one), so payments arrive late rather than never. Restricted keys are a Stripe feature described in Stripe's API keys documentation (opens in a new tab).

How payments are matched to visits

Connecting brings in the money. Crediting it to a visit needs the Reveata visitor id on the checkout:

How you sell on Stripe Where the id goes
Payment Links, Buy Buttons, Pricing Tables Added by the script as client_reference_id=dt_<visitorId>_<sessionId>, no code
Checkout Sessions your server creates metadata.reveata_visitor_id and metadata.reveata_session_id
Elements, Payment Element, mobile SDKs The PaymentIntent's metadata
Subscriptions The first invoice or the subscription's metadata; renewals inherit

reveata_user_id (the id you pass to identify) is read as a third key. Payments with no id are matched by the customer's email for visitors you identified, and unmatched payments are retried every hour for 90 days.

How Reveata counts Stripe money

  • A subscription invoice is one payment, without tax. A PaymentIntent that pays an invoice is counted once, through its invoice.
  • A $0 invoice is not a payment; free trials come from the subscription.
  • Live keys only count live payments and test keys only test payments.
  • Amounts are converted to your website currency at the rate of the payment day.

Every payment is stored once under its Stripe id, however often Stripe sends it (why payments are never counted twice).

Frequently asked questions

Can Reveata change anything in my Stripe account?

No. Both connection methods are read-only for payments. The only write a restricted key may allow is creating and removing Reveata's own webhook endpoint, and that permission is optional.

What if I sell through Ghost, Webflow or another tool that uses my Stripe account?

Connect the same Stripe account. Those tools create the checkout themselves, so their payments carry no visitor id and are credited by email instead. Everything else the account takes is imported too.

Does Stripe Tax or VAT inflate the numbers?

No. Invoices are counted without tax, so revenue in Reveata is what you earned before tax.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
IntegrationStripe Checkout analytics and attributionAdd the Reveata visitor and session ids to the metadata of each Stripe Checkout Session your server creates. When Stripe reports the payment, Reveata reads the ids and credits the money to the exact visit that started the checkout.IntegrationStripe Payment Links analytics without codeThe Reveata script adds the visitor and session ids to every Stripe Payment Link, Buy Button and Pricing Table on your pages as a client_reference_id. Stripe stores it on the payment, and Reveata uses it to credit the sale to the visit, with no code to write.IntegrationStripe subscription analytics by acquisition channelWith Stripe connected, Reveata reads your subscriptions and invoices to show MRR and its movements, and groups paying subscriptions by the first-touch channel of each customer, so you can see which channels bring subscribers who stay.IntegrationDodo Payments analytics with revenue by sourceReveata connects to Dodo Payments with an API key and a webhook you add in Dodo, imports payments, refunds, disputes and subscriptions, and credits each payment to a visit through reveata_visitor_id in the checkout or payment metadata.IntegrationPolar analytics with revenue attributionReveata imports Polar orders, refunds and subscriptions and receives new ones through a Polar webhook. Put the Reveata visitor id in the checkout metadata, which Polar copies onto orders and subscriptions, and each sale is credited to the visit that led to it.IntegrationRevenue attribution for custom billing with the Payments APIIf your provider is not one Reveata connects to, or you bill customers yourself, post each payment to the Reveata Payments API with a website key. Include the visitor id, a user id or an email, and the payment is attributed like any connected provider's.