Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Payment gateway self-referral: how to fix broken attribution

CNV-216Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A self-referral is when your own site, or a service you use as part of your own checkout, shows up as a traffic source. Payment gateways are a common cause. The customer clicks an ad, lands on your store, picks a product and is sent to a page on another domain to pay, for example paypal.com, checkout.stripe.com or a bank page for 3-D Secure.

How the sale loses its source
  1. Ad clickVisitor arrives with gclid or UTMs
  2. Product and cartSource recorded correctly
  3. Gateway pageVisitor pays on paypal.com
  4. Return to thank-you pageNew session, referrer is the gateway
  5. Purchase reportedCredited to paypal.com / referral

The break happens when the customer returns from the gateway and a new session starts with the gateway as referrer.

Why it costs you leads or sales

The sale still happens, so the money arrives. What you lose is the knowledge of which channel earned it. Your ad and email reports show fewer sales than they really drove, and a "referral" line from the gateway looks like a strong channel that you cannot actually grow.

That leads to bad decisions. You might cut a campaign that works, because its return looks weak. Smart bidding in Google Ads can also learn from fewer or wrongly assigned conversions, depending on how you import them.

Where purchases are creditedExample numbers
Where purchases are credited (example)Paid search (broken): 30 % of purchases; Gateway referral (broken): 25 % of purchases; Paid search (fixed): 52 % of purchases; Gateway referral (fixed): 3 % of purchases020403025523Paid search (broken)Gateway referral (bro…Paid search (fixed)Gateway referral (fix…% of purchases

Example: the same 100 purchases reported before and after adding the gateway to the unwanted referrals list. Numbers are illustrative.

How to check if your site has it

Look for gateway domains in your reports
  1. Open the traffic acquisition reportGoogle Analytics 4

    In GA4 go to Reports > Acquisition > Traffic acquisition. Change the dimension to Session source / medium.

  2. Scan for payment domains

    Look for paypal.com, checkout.stripe.com, pay.google.com, klarna.com, your bank's 3-D Secure domain or a hosted checkout domain in the list, especially with medium referral.

  3. Check the sources of purchases

    Open Reports > Monetization > Ecommerce purchases or add a Purchase event filter. If a gateway is among the top sources for purchases, self-referral is likely.

  4. Compare with your ad platform

    If Google Ads or Meta report more sales than GA4 credits to those channels, part of the gap may be this issue.

  5. Test one purchase yourself

    Click one of your own tagged links, pay through the gateway in test mode or with a refundable order, then check in GA4 DebugView or Realtime which source the purchase gets.

How to fix it

The main fix is to tell analytics that these domains are not real traffic sources. In GA4 this is the unwanted referrals list. Sessions that arrive from a listed domain keep the previous source instead of starting as a referral.

Add the gateway to your referral exclusions
  1. Check your GA4 configuration

    The unwanted referrals list is set in GA4, not in GTM. In GTM, make sure the GA4 tag fires on the thank-you page and does not use a custom page_referrer that overrides the value.

  2. Keep the tag on all pages

    The thank-you page should load the same GA4 tag as the rest of the site, so the session continues.

Fix it in GA4
  1. Open the data streamGoogle Analytics 4

    Go to Admin > Data collection and modification > Data streams and select your web stream.

  2. Open tag settings

    Click Configure tag settings, then Show all, then List unwanted referrals.

  3. Add each gateway domain

    Choose Referrer domain contains and enter the domain, for example paypal.com. Add one row per domain.

  4. Save and wait

    Changes apply to new sessions only. Old data stays as it was.

  5. Check other tools

    Meta, TikTok and other platforms use their own attribution, so check their settings for similar referral exclusion options and rely on their click IDs.

Common gateway domains to consider. Check your own payment flow, since the domains you need depend on the gateway and the setup.
GatewayDomain to checkWhy
PayPalpaypal.comCustomer approves payment on PayPal and returns
Stripe Checkoutcheckout.stripe.comHosted payment page
Klarnaklarna.comRedirect to approve a pay-later plan
Bank or 3-D SecureYour bank's domainCard check happens on an external page

How to confirm it's fixed

Confirmation checks
  • The gateway domains appear in GA4 under List unwanted referrals.
  • A test purchase from a tagged link keeps its original source and medium in Realtime or DebugView.
  • Gateway domains no longer rank among top sources for new purchases.
  • The share of purchases credited to Direct or Unassigned has not jumped after the change.
  • Ad platform and GA4 sales counts move closer together over the next weeks.
Attribution before and after

Before

  • paypal.com listed as a top referral
  • Paid campaigns look weaker than they are
  • Return from the gateway starts a new session

After

  • Gateway domains in unwanted referrals
  • Purchases keep the original ad or search source
  • Reports match ad platform numbers more closely

How to prevent it happening again

Prevention habits
  • Update the unwanted referrals list whenever you add a payment method or change gateway.
  • Review the traffic acquisition report for new payment domains once a month.
  • Run a tagged test purchase after each checkout or theme change.
  • Keep the analytics tag on the thank-you page and on any return URL.
  • Document which gateways redirect and which stay on your page.

How FunnelGuard handles this

FunnelGuard does not check for gateway self-referral yet. It is a possible future check, and nothing in FunnelGuard today reports which source your analytics credits for a purchase.

What FunnelGuard does cover nearby: a robot visitor runs your real customer journeys on a schedule, checks each step, and checks the tracking hits sent to GA4, Google Ads, Meta and other platforms. If the checkout stops working or a purchase tag stops firing, you get one alert with a screenshot and a likely cause. It stops before payment unless your store's test mode is set up.

To watch for self-referral yourself, add a monthly reminder to open GA4 Traffic acquisition, filter purchases by source, and look for gateway domains. You can also run a free read-only website audit from FunnelGuard, and start with the Free plan (1 site, 2 journeys, daily checks, no card) to monitor the checkout itself.

Questions people ask

Why is PayPal showing as a traffic source in GA4?

Customers leave your site to approve payment on paypal.com and return to your thank-you page. The browser reports PayPal as the referrer, so GA4 can start a new session credited to it. Add paypal.com to List unwanted referrals to stop this.

How do I add a referral exclusion in GA4?

Go to Admin > Data streams, select your web stream, click Configure tag settings, then Show all and List unwanted referrals. Add the domain with the match type Referrer domain contains and save. It applies to new sessions only.

Why are my purchases showing as referral instead of my ad campaign?

A redirect through a payment gateway or another outside domain often starts a new session on return. The gateway becomes the source and the original campaign is lost. Excluding the gateway domain in GA4 and keeping tracking on the return page usually fixes it.

Does Stripe Checkout cause self-referral?

It can. Stripe's hosted Checkout runs on checkout.stripe.com, so the customer leaves your domain and returns afterwards. Adding that domain to your unwanted referrals list helps. Embedded Stripe Elements keep the customer on your site and usually do not cause it.

Will excluding referrals change my past data?

No. The unwanted referrals list affects new sessions only. Earlier reports keep the old gateway attribution, so note the date of the change when you compare periods.

Does gateway self-referral affect Google Ads conversions?

It can, depending on how you measure. If Google Ads imports conversions from GA4, wrongly credited purchases may not be matched to the ad click. Conversions measured by the Google Ads tag with the gclid are less affected, so compare both.

Can FunnelGuard detect gateway self-referral?

Not yet. It is a possible future check. FunnelGuard does monitor your checkout journey and the tracking hits it sends, so it can alert you if a purchase tag stops firing, but you need to review GA4 sources yourself for this issue.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.