TL;DR:
To track revenue in analytics, connect Stripe with a restricted, read-only key so the tool can match payments to the visits that produced them. Once connected, each payment is attributed back to its source, campaign and landing page, giving you revenue by channel instead of just conversion counts. In Open Analytics this takes a couple of minutes and needs no code changes.
Counting conversions tells you a purchase happened; tracking revenue tells you where the money came from. Connecting Stripe to your analytics closes that loop, so your reports show revenue by channel and campaign, not just a checkout event. Here is how to set it up.
- 1
Create a restricted, read-only Stripe key
In your Stripe dashboard, create a restricted API key with read-only access to the resources the analytics tool needs (charges and payment intents). Read-only means the analytics can see payments but can never move money, the least privilege the job requires.
- 2
Connect it in your analytics tool
Paste the key into your analytics tool's revenue or integrations settings. No code changes to your checkout are needed: the tool reads payments from Stripe directly, so you are not instrumenting purchase events by hand.
- 3
Let it match payments to visits
From then on, each payment is matched back to the visit and source that produced the customer. Give it a little time to backfill recent payments and to catch new ones as they happen.
- 4
Read revenue by source
Open your revenue report and read money by channel, campaign and landing page, which ad earned, which post paid, which page converts revenue and not just clicks. This is the number that decides where the next marketing dollar goes.
Always use a restricted, read-only key, never your secret key. Analytics needs to read payments, never to create or refund them, so the key should not be able to.
Open Analytics connects Stripe with a read-only key in a couple of minutes and attributes every payment back to its source, cookielessly.
See revenue attributionFrequently asked questions
- How do I connect Stripe to my analytics?
- Create a restricted, read-only Stripe API key (access to charges and payment intents), then paste it into your analytics tool's revenue settings. No checkout code changes are needed, the tool reads payments from Stripe and matches them to visits. In Open Analytics this takes a couple of minutes.
- Is it safe to connect Stripe to an analytics tool?
- Yes, if you use a restricted, read-only key. That lets the analytics see payments to attribute revenue, but it cannot create charges, issue refunds or move money. Never paste your full secret key; the read-only restricted key is the least privilege the job needs.
- Do I need cookies to attribute revenue to a source?
- No. Revenue attribution matches a payment to the visit that produced it using the visitor journey, which cookieless tools keep with a daily-rotating anonymous signal rather than a persistent cookie. Open Analytics attributes revenue to its source with no cookie set and no consent banner.