Guide · Stripe
UTM Parameters on Stripe Payment Links: The Complete Guide
How to add UTM parameters and client_reference_id to Stripe Payment Links, what Stripe records, and how to get organic traffic attributed too.
· 3 min read
Stripe Payment Links are the quickest way to sell: no code, one URL. They also accept tracking parameters, so you can see which campaign a payment came from. Here is what works, what Stripe records, and where the gaps are.
Add UTM parameters to the link
Stripe Payment Links accept the five standard UTM parameters in the URL's query string (Stripe's docs):
https://buy.stripe.com/abc123?utm_source=newsletter&utm_medium=email&utm_campaign=launch
utm_source: where the link lives (newsletter, x, youtube)utm_medium: the type of channel (email, social, cpc)utm_campaign: the push (launch, black-friday)utm_termandutm_content: optional detail, such as the ad or the button
Stripe stores these on the resulting payment, so you can see them in the payment's details and in exports.
Add client_reference_id for your own matching
Payment Links also accept client_reference_id, a string of your choice that ends up on the Checkout Session. Use it to carry a user id or a visitor id so your system can match the payment later:
https://buy.stripe.com/abc123?client_reference_id=visitor_8f2c
It must be made of letters, numbers, dashes and underscores, and stay within Stripe's length limit.
Where this approach falls short
UTM tags on the payment link only describe the link itself. That leaves gaps:
- The link on your pricing page. A visitor arrives from Google, reads your blog, then clicks "Buy" on your site. The payment link carries whatever you hard-coded, not "Google".
- Untagged traffic. Search, AI assistants and referrals from other sites never pass through a link you tagged.
- Reporting. Stripe shows the parameters per payment, but not revenue grouped by source next to your visitor counts.
The fix is to tag the payment link dynamically with the current visitor, then let analytics remember where that visitor came from.
Let DataFair tag the links for you
With the DataFair script on your site, every buy.stripe.com link on your pages is tagged with the visitor's id when the page loads. When the payment arrives through Stripe's webhook, DataFair matches it to the visitor and credits the source of their last visit that came from somewhere: Google, a newsletter, ChatGPT, a campaign.
- 1Visitor arrives from GoogleDataFair records the source
- 2Visitor clicks BuyThe script has already added their id to the Payment Link
- 3Stripe takes the paymentcheckout.session.completed is sent to DataFair
- 4Revenue appears under GoogleNext to visitors, pages and campaigns
You keep your own UTM parameters on links you share elsewhere. They become the visit's source when people land on your site. The Stripe setup guide covers the webhook in a few steps.
Tips for clean Payment Link data
- Use lowercase values and one naming list, or
Emailandemailbecome two sources. - Don't put personal data (emails, names) in UTM values or
client_reference_id. - If links you share still show as direct, check these causes.
Related guide: Stripe revenue attribution.
Questions
- Does Stripe show UTM parameters in the dashboard?
- Stripe records them on the payment from a Payment Link, and you can see them in the payment's details and exports. It doesn't group revenue by them next to visitor numbers.
- Can I use client_reference_id and UTM parameters together?
- Yes. They're separate parameters on the same URL.
- Do I need to tag my Payment Links if I use DataFair?
- Not the ones on your website: the script does it. Tag links you share outside your site, such as in emails or posts, so the visit's source is clear.