How to match Stripe payments to ad clicks with exports
To match Stripe payments to ad clicks you need three files: the ad platforms' campaign reports, your sign-up records with the click identifier or UTM tags captured on arrival, and a Stripe payments export. Join payments to sign-ups by customer, then sign-ups to campaigns by click. This is how Datarithms prepares early-access tables today.
What do you need before you start?
The click must be captured when the person arrives. Ad platforms can add an identifier to the landing URL: gclid for Google (with auto-tagging on), fbclid for Meta, ttclid for TikTok, and li_fat_id for LinkedIn (with enhanced conversion tracking on). You can also add UTM tags with the campaign name. Your sign-up form or product must store them with the new account. Without that, a payment can only be matched by email or not at all.
What are the steps?
Export payments from Stripe
Customer ID or email, payment date, amount and refund status for the period plus 14 days.
Drop refunds within 14 days
Remove customers whose payment was refunded within 14 days of paying.
Join payments to sign-ups
Match each paying customer to their sign-up record by Stripe customer ID or email.
Read the last click
From the sign-up record, take the last ad click identifier or UTM campaign within 90 days before payment.
Join clicks to campaigns
Map each click or UTM campaign to the campaign in the platform report, then count customers per campaign.
List the rest as unmatched
Customers with no usable click stay on an unmatched line. Do not distribute them.
What does the joined result look like?
| Customer | Paid | Last ad click | Campaign | Counted |
|---|---|---|---|---|
| cus_A41 | 3 Nov | Google Ads, 28 Oct | Search, brand terms | Yes |
| cus_B07 | 4 Nov | Meta Ads, 2 Aug | None: older than 90 days | Unmatched |
| cus_C19 | 6 Nov | Meta Ads, 1 Nov | Lookalike, sign-ups | No: refunded 9 Nov |
| cus_D22 | 7 Nov | None | None | Unmatched |
Common questions
What if I only have UTM tags?
UTM tags are enough to match a customer to a campaign if your sign-up records keep them. Click identifiers help when campaign names change.
Does this work with HubSpot instead of Stripe?
Yes. Use closed-won deals as the payment and match them to contacts that carry the original source.
Related pages
- How to calculate cost per paying customerSpend divided by customers who paid and stayed. How to count both sides honestly.
- How it worksThe matching rules behind the weekly table: last ad click within 90 days, refunds within 14 days excluded, no verdict under 30 paying customers.
- Google Ads and paying customersSearch and Performance Max conversions vs paying customers, and the export we need.
- LinkedIn Ads and paying customersLinkedIn leads and conversions, lead forms, long sales cycles, and the export we need.
Want your own table?
Tell us which ad platforms you use and roughly what you spend. We reply by email within two working days.
Early access: we prepare your weekly table with you from your own exports while the direct connections are built.