Skip to main content

Samarth Analytics

GA4 Data Filters, Referral Exclusions and Unwanted Referrals: The Settings That Decide Attribution

By Samarth Analytics · Published · Updated · GA4 Implementation · 7 min read

Summary: A handful of rarely visited GA4 settings decide which channel gets credit for a sale and which traffic is counted at all. Payment gateways that steal conversions, self-referrals that split journeys, internal traffic that inflates engagement and a debug flag left on in production can each distort attribution for months. This guide explains how unwanted referrals, cross-domain configuration and data filters work, and gives a routine for auditing them.

GA4 Data Filters, Referral Exclusions and Unwanted Referrals: The Settings That Decide Attribution

Small settings, large consequences

Most GA4 attribution problems we find in audits are not caused by the attribution model. They are caused by a few configuration screens that were set once, years ago, or never set at all. These settings decide whether a returning customer's purchase is credited to the campaign that brought them or to a payment gateway, whether a journey across two of your domains counts as one visit or two, and whether your own team's visits are counted alongside customers'.

Because the settings are tucked away in the data stream and admin menus, they rarely get reviewed. Here is what each one does, the mistakes we see most often, and how to check them.

Unwanted referrals: stop gateways stealing credit

When a customer leaves your site to pay - through a payment gateway, a bank's card authentication page, a wallet, or a buy-now-pay-later provider - and then returns to your confirmation page, the return looks like a new arrival from that domain. Without configuration, GA4 can credit the purchase to the gateway as a referral rather than to the channel that actually brought the customer.

The fix is the unwanted referrals list, found in the web data stream under the tag settings. Domains listed there are ignored as referral sources, so the returning visit keeps the original source. The domains to add depend on your stack, but typically include your payment gateway, any card authentication or bank redirect domains you see in referral reports, single sign-on providers if users log in through a third party, and booking or checkout platforms hosted on another domain you do not tag.

The practical test is simple: open a referral report for the last ninety days and look for payment, bank and login domains. Every one of them with conversions attached is a channel losing credit it earned. We covered this class of problem in attribution leaks across channels.

Cross-domain configuration: one journey, one user

Unwanted referrals are for domains you do not control. Domains you do control and tag with the same GA4 property need cross-domain measurement instead. Configured in the same tag settings area, cross-domain measurement adds a linker parameter to links between your domains, so the user and session continue rather than restarting with a self-referral.

The two are often confused. Listing your own second domain as an unwanted referral hides the self-referral but still splits the user into two identities, because the client ID is not passed across. Configuring cross-domain measurement passes the identity and keeps the journey whole. The edge cases - redirects that strip the linker parameter, forms that post across domains, links opened in new tabs - are covered in GTM cross-domain linker gotchas and multi-domain GA4 tracking.

Data filters: what is counted at all

GA4's data filters remove events from processing entirely. Two kinds are available. The internal traffic filter excludes events marked as internal, usually through rules that match your office IP addresses. The developer traffic filter excludes events sent with debug mode enabled, which is how DebugView sessions are kept out of reports.

Each filter can be in one of three states: testing, active or inactive. In testing state, matching events are labelled but kept, and a dimension shows which filter they matched, so you can see the effect before committing. In active state, matching events are permanently excluded. There is no undo; data filtered while a filter was active is gone.

Warning: If a debug flag is left enabled in a production tag - a hardcoded debug setting in a GTM configuration, for example - an active developer traffic filter will silently exclude real visitors. Check that debug mode is only ever set in preview or test environments.

Internal traffic rules that actually work

IP-based internal traffic rules were designed for offices with fixed addresses. Modern teams work from home, on mobile data and through VPNs, and their IP addresses change constantly. Rules written for one office address now catch a small fraction of internal traffic. Meanwhile, agency staff, QA testers and automated tests hit the site from addresses nobody listed.

Better approaches combine methods: keep IP rules for fixed locations and VPN exit addresses, and add a way for staff to mark themselves - a cookie set by visiting an internal URL, read by GTM, which sets the traffic_type parameter to internal. Test any new rule in testing state for a week and compare engagement metrics with and without it before activating.

Neighbouring settings worth checking at the same time

Three more settings live close by and change how the same traffic is reported:

  1. Session timeout. The default is thirty minutes of inactivity. Sites where people genuinely pause for longer - long-form content, configurators, video courses - may see one visit split into several sessions, each crediting a different source. Adjust it only with a reason, and annotate the change.
  2. Engaged session timer. A session counts as engaged after ten seconds by default, or with a key event or two page views. Raising the timer makes engagement rate stricter; changing it silently makes every historical comparison of engagement rate invalid.
  3. Attribution settings. The reporting attribution model and the key event lookback windows decide how conversions are credited across touchpoints. A lookback window shorter than your sales cycle hands credit to the last few touches, whatever the referral settings say.

None of these are wrong by default, but each should be a decision someone made, recorded alongside the referral and filter settings.

An audit routine for these settings

  1. Export the unwanted referrals and cross-domain lists and check each entry is still relevant.
  2. Review the top referral sources by conversions for gateways, banks, login providers and your own domains.
  3. Check every data filter's state, and confirm none is active without a record of when and why it was activated.
  4. Search your tag configurations for debug mode settings outside test environments.
  5. Compare internal traffic volume in testing state with what you would expect from team size.
  6. Record the settings and the date of review in your measurement documentation.

These settings interact with your channel definitions too; if you have built a custom grouping, as described in GA4 custom channel groups, review both together.

When something was wrong for months

Fixing these settings changes future data only. GA4 does not reprocess history when you add an unwanted referral or adjust a filter. Annotate the date of the change, explain the expected shift to stakeholders - referral conversions will fall and other channels will rise - and, if you export to BigQuery, consider reclassifying past sessions in your modelling layer so year-on-year comparisons stay meaningful. The GA4 implementation guide lists these settings among the decisions to make on day one of a property.

Final thoughts

Unwanted referrals, cross-domain configuration and data filters are among the least glamorous screens in GA4 and among the most influential. They decide whether conversions are credited to the campaigns that earned them and whether the traffic you count is customers or colleagues. Review them quarterly, test filters before activating them, and treat any change as an event worth annotating.

If you would like these settings checked against your stack, our GA4 implementation team can help, and a free audit covers every one of them.

Topics: attribution leaks, GA4, marketing attribution, GA4 audit

More articles on the Samarth Analytics blog · Markdown version of this article