GA4 self-referrals happen when a visitor leaves the client's site for a payment page, booking tool or second domain and comes back, so GA4 records the return as a referral and gives that domain credit for the conversion. Fix it in two places in the web stream's tag settings: add domains the client owns to "configure your domains" so the _gl linker carries the visitor across, and add third-party domains the visitor passes through, such as Stripe, PayPal or Calendly, to "list unwanted referrals". Then test the full journey and watch the referral sources disappear from reports.
This matters most to agencies running paid campaigns. When a paid visitor's purchase or booking is credited to checkout.stripe.com or calendly.com instead of Google Ads or Meta, the paid channel looks worse in GA4 than it is, and any GA4 key events imported into Google Ads lose their link to the click.
How self-referrals steal credit from paid campaigns
Consider a typical journey:
- A visitor clicks a Google ad and lands on the client's site. GA4 records the session source as google / cpc.
- They book a consultation through a link to Calendly, or pay through a hosted Stripe or PayPal page.
- Calendly or the payment page redirects them back to a thank-you page on the client's site, where the lead or purchase event fires.
On that return, the browser's referrer is the third-party domain. Unless GA4 has been told to ignore it, the thank-you page view carries a new traffic source: calendly.com / referral or checkout.stripe.com / referral. If the visitor spent more than 30 minutes on the third-party page, a new session starts with that referral as its source. Even inside the same session, the referral is a new touchpoint, and GA4's event-scoped attribution in key event reports and in Google Ads imports gives the conversion to the most recent eligible source, which is now the referral.
The result: GA4 shows conversions from a payment processor or a booking tool, paid campaigns look like they convert less, and nobody notices because "Referral" is just one more row in the channel report.
Cross-domain measurement vs unwanted referrals
These two settings solve different problems. Using the wrong one is a common mistake.
| Configure your domains (cross-domain) | List unwanted referrals |
| Use for | Domains the client owns and tags with the same GA4 stream | Third-party domains the visitor passes through and returns from |
| Examples | clientsite.com and clientbooking.com; a marketing site and a separate app domain | checkout.stripe.com, paypal.com, calendly.com, other payment and booking providers |
| What it does | Adds the _gl parameter to links between the listed domains so the visitor keeps the same client ID and session | Tells GA4 to ignore the referrer from those domains so the original source stays |
| Requires | The same GA4 tag on all domains | Nothing on the third-party domain |
Rule of thumb: if you can put the client's GA4 tag on the domain, it belongs in cross-domain. If you cannot, and visitors come back from it, it belongs in unwanted referrals.
Setting up cross-domain measurement
- Confirm every domain in the journey loads the same GA4 measurement ID, through the same or a matching GTM setup.
- In GA4, open the web data stream, go to the Google tag settings, and find "configure your domains".
- Add each domain with a match type (usually "contains" with the root domain, for example
clientsite.com).
- Save. The Google tag starts decorating links between those domains with the
_gl parameter.
How the _gl linker works
When a visitor clicks a link from one configured domain to another, the Google tag appends _gl=... to the destination URL. That value carries the client ID and session information. The tag on the destination reads it, keeps the same identifiers, and the journey stays one session with the original source.
The linker works on link clicks and standard form submissions. It does not automatically decorate:
- Navigations done with JavaScript (
window.location changes, buttons that are not links).
- Server-side redirects that drop query parameters.
- Links inside iframes.
If any of those are in the journey, you need to pass the linker value manually or change the navigation. Also check that the destination site does not strip unknown query parameters. Some CMSs, landing page builders and redirect rules remove _gl (and sometimes gclid) before the tag reads them.
Subdomains
Subdomains of the same root domain, such as www.clientsite.com, shop.clientsite.com and book.clientsite.com, do not need cross-domain configuration. GA4 sets its cookie on the root domain by default, so all subdomains share it automatically. You only need to make sure the same measurement ID is on each and that no one has overridden the cookie domain. They can still show up as self-referrals if a subdomain is missing the tag or uses a different property; the fix there is the tag, not a setting.
Setting up unwanted referrals
- In the same Google tag settings area, open "list unwanted referrals".
- Add a condition per domain. Use "contains" with the domain so subdomains are covered:
stripe.com, paypal.com, calendly.com.
- Add every payment, booking or verification domain visitors pass through. Common ones include Stripe, PayPal, Square, Klarna, Afterpay, Calendly, Acuity, bank 3D Secure pages and SSO or identity providers if the client's site has logins.
- Save. This applies to data from that point on; it does not change history.
Under the hood, GA4 sets an ignore_referrer flag on events from those referrers, so the existing source is kept. Do not add the client's own domain here as a substitute for fixing a missing tag; that hides the symptom.
Shopify and hosted checkouts
Current Shopify checkouts run on the store's own domain, so the old checkout.shopify.com referral problem rarely appears on modern stores. The more common Shopify issue is that checkout pages run tracking through Shopify's customer events in a sandbox, separate from the theme's tags, and a store can end up with both an app and a custom pixel sending purchases. That causes duplicates rather than referrals; see duplicate pixel events on Shopify and WordPress for the same pattern on Meta. If the store uses a third-party checkout or payment app that sends customers to another domain, add that domain to unwanted referrals.
Iframes: booking widgets and embedded forms
Embedded Calendly, Typeform, HubSpot meetings and payment fields run inside iframes. Two separate issues come up:
- Referrals. An embedded iframe does not usually cause a self-referral on the parent page, because the visitor never leaves the page. The referral problem appears when the widget redirects the whole window to a thank-you page, or when the tool is opened as a link instead of an embed.
- Tracking the conversion. The parent page's GA4 tag cannot see what happens inside a third-party iframe. Listen for the tool's postMessage events (Calendly's
calendly.event_scheduled, for example) and fire the event from the parent page. Do not put the client's GA4 tag inside a third-party iframe and expect it to join the parent session; iframes on another domain often cannot use the parent's cookies, and the result is a separate, unattributed user.
Our GA4 key events and naming plan covers the listener approach for HubSpot, Typeform and Calendly.
A worked example: paid lead through a booking link
Here is how the pieces fit for a common lead-gen setup: a service business running Google Ads, where the "Book a call" button links to a Calendly page and Calendly redirects back to a thank-you page on the client's site.
- The problem. GA4 shows a steady stream of key events from calendly.com / referral, and the paid search campaign shows fewer booked calls than the client's calendar does.
- Fix the referral. Add
calendly.com to unwanted referrals. The return visit to the thank-you page keeps the google / cpc source.
- Fix the event. A thank-you page view is a weak signal; anyone can reload it. Better: embed Calendly inline on the client's page, listen for
calendly.event_scheduled, and push generate_lead with lead_type set to booked_call. The visitor never leaves, so there is no referral to exclude, and the event only fires on a confirmed booking.
- Fix the hand-off to Google Ads. Decide whether the GA4 import or a native Google Ads conversion is primary for booked calls, and make the other secondary.
- Verify. Run a test booking from a URL with test UTMs, confirm one event in DebugView with the right source, and compare booked calls in GA4 against the calendar for the following two weeks.
The same pattern applies to Stripe Payment Links, PayPal and hosted quote tools: exclude the referrer, fire the conversion on a confirmed signal, and check one conversion action is primary.
How to diagnose self-referrals in reports
- Traffic acquisition report. Set the primary dimension to session source / medium. Look for the client's own domains, payment processors and booking tools with medium "referral".
- Key event attribution. In the advertising section, check conversion paths and look for those referral sources appearing as the last touchpoint before key events.
- Exploration by landing page. Build a free-form exploration with session source and landing page. Self-referral sessions typically land on thank-you, confirmation or account pages, which no one reaches directly from a real referral.
- Compare with the CRM. If the CRM shows a lead came from paid search (through a captured GCLID or UTMs) but GA4 credits Stripe or Calendly, you have found one.
- Hostname check. Add hostname as a dimension. Unexpected hostnames (staging sites, old domains, translation proxies) sending data to the property also cause odd referrals and should be filtered or fixed.
How to test the fix
- Open the site in an incognito window with a test UTM, for example
?utm_source=test&utm_medium=cpc&utm_campaign=crossdomain_test.
- Turn on GTM preview or debug mode and watch DebugView.
- For cross-domain: click through to the second domain. Confirm the URL contains
_gl= on arrival, and that the client ID on both domains matches (visible in the _ga cookie or in the debug event details).
- For unwanted referrals: complete a test payment or booking and return to the thank-you page. In DebugView, the page view should not carry the third-party domain as its source.
- The next day, check the traffic acquisition report for the test campaign name. The conversion should sit under your test source, not under a referral.
- After a week or two, the volume of payment and booking referrals in the traffic report should fall sharply. If it does not, a domain is missing from the list or a redirect is stripping parameters.
Common mistakes
- Putting third-party domains in cross-domain configuration. The linker cannot help on a domain without the client's tag.
- Putting owned domains in unwanted referrals instead of fixing tagging, which hides the problem and still splits users.
- Configuring cross-domain for subdomains that already share a cookie.
- Redirects or URL rewrites that strip
_gl and gclid.
- Testing only on desktop. Payment apps on phones often open a different flow.
- Expecting historical data to be corrected. Fixes apply from the day they go live, so note the date in the client's change log.
What we check in an audit
- Every domain and third-party tool in the conversion journey.
- Cross-domain and unwanted referral lists against that journey.
- Referral sources and hostnames in the last 90 days of data.
- Whether
_gl and gclid survive every redirect.
- How embedded widgets report their conversions to the parent page.
- A tested end-to-end journey with a DebugView capture.
Stop referrals taking paid credit
Cross-domain measurement and referral exclusions are part of every GA4 audit we run for agencies, tested end to end with a DebugView capture as proof. If you want to see what that looks like first, there is a sample audit.