Why GA4 credits your sales to PayPal
The pattern is nearly always the same. A user arrives from a Google Ads campaign, adds a product to the cart, chooses PayPal and completes payment on paypal.com. PayPal then sends them back to the order confirmation page, where the purchase event fires. As far as the browser is concerned, that page was opened from paypal.com, which becomes the referrer the Google tag reads.
From there the data can break in two ways. If more than 30 minutes of inactivity pass between leaving and returning (GA4's default session timeout), the sale lands in a new session with source paypal.com / referral. Even when the session stays the same, the PayPal hop is recorded as a new touchpoint, and event-based attribution reports may give it credit for the conversion. The usual outcome is a Referral channel with an unrealistic conversion rate and paid campaigns that appear to sell less than they really do.
The same happens with Stripe, Klarna, bank-hosted payment pages and 3D Secure authentication pages. The fix is one setting: telling GA4 which domains must not count as a traffic source.
How GA4 handles referrals and sessions
Three rules explain almost every case:
- Timeout: by default a session ends after 30 minutes without activity. A payment with a PayPal login, a confirmation in the banking app and some hesitation easily goes past that.
- Self-referrals: GA4 does not record as referral traffic that comes from the same domain as the current page, subdomains included, or traffic arriving through a cross-domain setup with the
_glparameter. - Unwanted referrals: for domains you list, GA4 adds the
ignore_referrerparameter with the valuetrueto every matching event. The referrer is ignored and does not appear as a source.
PayPal and payment gateways fit neither of the first two cases, so you have to list them yourself.
Setting up the unwanted referrals list
You need the Editor role or above on the property. The path is:
- Open Admin and, under Data collection and modification, choose Data streams.
- Select the site's web stream.
- At the bottom of the page click Configure tag settings, then Show all.
- Open List unwanted referrals.
- For each domain choose a match type, enter the domain (for example
paypal.com) and add a new condition for the next one. - Save.
Conditions are evaluated with OR logic and the limit is 50 per stream. A "contains" match on paypal.com also covers www.paypal.com and subdomain variants, but avoid strings that are too generic: "pay" would also exclude sites that send you real visits.
Which domains to add first
Start from your data, not from a list found online. In GA4 open Reports > Acquisition > Traffic acquisition, set the dimension to Session source / medium, filter for medium referral and add the purchases metric. Sources with sessions that almost all end in a purchase, with hardly any page views before it, are nearly always gateways or banks. Usually the first ones are PayPal, your card provider's checkout domain and the buy-now-pay-later services you offer.
Gateways, banks and 3D Secure
With the strong customer authentication required by PSD2 in Europe, many card payments go through a 3D Secure check run by the issuing bank: a password, a one-time code or biometric confirmation. Depending on the integration, the customer may be redirected to a domain owned by the bank or its authentication provider, then sent back to your site.
The practical problem is that these domains are numerous and differ from bank to bank. You don't need to chase all of them: use the report above to find the ones bringing the most purchases and add those. If you see many different domains ending in the same provider suffix, one "ends with" condition covers several at once and saves slots out of the 50 available.
One caution: don't exclude a domain that also sends you genuine traffic. Klarna or PayPal may have pages or apps that list shops; if you exclude the domain, those visits will be credited to the previous source or to direct. For most shops the cleaner data is worth that small loss, but it's worth knowing.
Your own domains, subdomains and cross-domain
If checkout or booking runs on a different domain that you own, for example a shop on one domain and a booking system on another, the unwanted referrals list is not enough. Hiding the referrer does not join sessions: without cross-domain measurement the second domain creates a new user identifier and the session splits anyway.
In that case use Configure your domains, in the same tag settings section, and enter every domain involved (up to 100 conditions). GA4 adds the _gl parameter to links between the domains and keeps the same user and session. Subdomains of the same domain are already covered by automatic self-referral detection.
Checking that the fix works
A test order with Tag Assistant
After saving, place a test order with PayPal, ideally a cheap product you can refund. With Tag Assistant running, check the confirmation page's page_view event: its parameters should include ignore_referrer with the value true. If it's missing, the domain doesn't match the condition you set.
Also make sure the return page carries no UTM parameters. Some plugins add them to the confirmation URL and create a new source at the very moment of purchase. Conventions that prevent this are in our guide to UTM parameters.
What to check in the reports
After two or three weeks, compare the reports:
- purchases credited to
paypal.com / referraland other gateways should drop to almost zero; - sales should shift back to Organic Search, Paid Search, Email and your other real channels;
- if only Direct grows sharply, sessions are probably still splitting because of the timeout or an unconfigured domain.
If purchase is a key event linked to Google Ads, the fix also changes the data your campaigns receive. How to set up and link key events is covered in our article on GA4 key events.
Limits: historical data is not corrected
The exclusion applies only from the moment you save it. Sessions already recorded with PayPal as source stay that way, and GA4 does not reassign them to the original channel. There is a less obvious effect too: under last non-direct click, a user already attributed to a domain before the exclusion who later returns directly can keep being attributed to that domain for the whole lookback window.
For historical comparisons there is no perfect remedy. In an exploration you can filter out gateway sources to read channel shares more clearly, knowing those sales won't go back to their true source. Record the date of the change in an annotation or a shared log, so whoever reads the reports six months from now knows why the Referral channel collapsed.
The PayPal referral is one of the most common data quality problems, but not the only one: a broader overview is in our article on GA4 data quality for ecommerce and in our GA4 server-side tracking guide. If you'd like us to review your shop's setup, get in touch through our contact page.
- ga4
- referral indesiderati
- paypal
- attribuzione
- gateway di pagamento
- 3d secure
- cross-domain
- ecommerce
Frequently asked questions
Why does PayPal show up as a source of sales in GA4?
After payment, PayPal sends the customer back to the confirmation page and the browser reports paypal.com as the referrer. If the session has expired or the attribution model counts that hop, the purchase is credited to paypal.com / referral instead of the channel that brought the customer.
Does referral exclusion fix past data?
No. The unwanted referrals list only applies to events collected after you save it. Sessions already recorded with PayPal as source stay unchanged, so for historical comparisons filter those sources out in an exploration and note the date of the change.
Should I exclude bank domains used for 3D Secure?
Only those that actually appear in your reports with purchases attached. Authentication domains vary by bank and the limit is 50 conditions per stream, so start with the ones carrying the most sales and use ends-with conditions where they share a suffix.
What is the difference between unwanted referrals and cross-domain?
The unwanted referrals list hides a domain as a source but does not join users and sessions. Cross-domain measurement uses the _gl parameter to keep the same user and session across domains you own. Use the first for PayPal and banks, the second for your own domains.
Sources
- [GA4] Identify unwanted referrals — Google Analytics Help
- [GA4] About Analytics sessions — Google Analytics Help
- [GA4] Set up cross-domain measurement — Google Analytics Help
- 3D Secure authentication — Stripe
- Document: referrer property — MDN Web Docs
Related articles
Analytics & Tracking · 7 min read
GA4 Data Quality for eCommerce: Turn Unreliable Data into Real Conversions
Learn how to identify and resolve data quality issues in GA4. This practical guide will help you correctly configure events, validate data, and leverage reliable insights to optimize campaigns and boost conversions.
Analytics & Tracking · 6 min read
UTM parameters: naming conventions that keep GA4 data clean
How to write source, medium and campaign consistently, match GA4's default channel groups and keep sessions out of Unassigned.
Analytics & Tracking · 7 min read
GA4 key events: which ones to set up and how to use them in Google Ads
Which events to mark as key events in GA4 for ecommerce and lead generation, how to set value and counting, and how to import them into Google Ads without double counting.
