Datarithms

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.

Last updated:

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?

  1. Export payments from Stripe

    Customer ID or email, payment date, amount and refund status for the period plus 14 days.

  2. Drop refunds within 14 days

    Remove customers whose payment was refunded within 14 days of paying.

  3. Join payments to sign-ups

    Match each paying customer to their sign-up record by Stripe customer ID or email.

  4. Read the last click

    From the sign-up record, take the last ad click identifier or UTM campaign within 90 days before payment.

  5. Join clicks to campaigns

    Map each click or UTM campaign to the campaign in the platform report, then count customers per campaign.

  6. 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?

Joined rowsExample data
CustomerPaidLast ad clickCampaignCounted
cus_A413 NovGoogle Ads, 28 OctSearch, brand termsYes
cus_B074 NovMeta Ads, 2 AugNone: older than 90 daysUnmatched
cus_C196 NovMeta Ads, 1 NovLookalike, sign-upsNo: refunded 9 Nov
cus_D227 NovNoneNoneUnmatched

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.

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.

We use these details only to reply to you and to decide who to onboard. They are stored on our server in the United States. See Privacy, Data handling and, for Türkiye, the KVKK notice.