Last updated: 2 January 2025

Exclude payment providers in GA4 (with referral exclusions)

Nick van Maaren
Freelance Ads & Analytics expert

When someone makes a purchase on your website, they are likely redirected to a payment platform before returning to the thank-you page. The problem is that when the user is redirected back to your website, Google Analytics oftentimes identifies the payment provider as the session source. The transaction event on the thank-you pages will therefore be attributed to the payment provider as the source instead of the original session source (e.g. Google). In this article I'll explain how to prevent this situation.

The problem explained more extensively

One of the most important superpowers of GA4 is related to their attribution model. It’s really easy in GA4 to gather data regarding the sources that have led to traffic and key events. However, for e-commerce website a lot of times payment providers show up in the list of sources because they are at the end of the funnel and the most important key events (purchases) will be attributed to these payment providers. This leads to two main issues:

1. Less insight into which channels are actually profitable
If you’re actively engaged in online marketing, you want to understand which activities generate results. When payment providers are marked as the source, it becomes harder to get a clear picture of this. Although GA4’s data-driven attribution model reduces the impact of this problem compared to Universal Analytics (UA), it still distorts your view of which sources generate the most revenue.

2. Fewer key events (conversions) via the Auto-Import function
This issue only applies if you use the “auto-import of GA4 key events” function in Google Ads. The auto-import function relies on a non-direct last-click attribution model, meaning it considers the last non-direct source. If the last non-direct source is Google Ads, the key event is imported into Google Ads. If it’s not, the key event is not imported. If you don’t exclude payment providers as referrals, Google Analytics often won’t send purchases to Google Ads.

The solution: excluding payment providers in GA4

Before walking you through the step-by-step process of excluding payment providers in Google Analytics 4, I’ll first show you how to identify which providers are currently linked to your revenue.

Step 1: Identify payment providers in GA4

  • Navigate to the relevant Google Analytics 4 property.
  • Go to Reports > Lifecycle > Acquisition > Traffic Acquisition.
  • Add a filter with the following values:
    • Include/Exclude: Include
    • Dimension: Session Default Channel Grouping
    • Dimension Values: Referral
  • In the report, you will see a graph at the top and a table below.
    • Adjust the table’s selected dimension from Session Default Channel Grouping to Session Source.
    • Adjust the number of rows displayed to ensure you see all relevant referrals.
  • The table now shows a list of all referrals, not just payment providers.
    • From this list, you need to manually identify the payment providers.
    • Optionally, sort by Total Revenue (right-hand column).

Step 2: Exclude payment providers in GA4

  • Navigate to the relevant Google Analytics 4 property.
  • Go to Admin > Data Streams and click on the relevant stream.
  • In the Google Tag block, click on Configure Tag Settings.
  • Under Settings, click Show All.
  • Select Define Internal Traffic and then Create a List of Unwanted Referrals.
  • Add the payment providers identified in Step 1 to this list. Be cautious when excluding referrals. If you use options like contains, starts with, ends with, or regex, you might accidentally exclude relevant referrals, which you want to avoid.
  • Save your changes.

Tip:
You can add up to 50 conditions, but by using regex, you can exclude more than 50 domains. Use the pipe symbol | to separate multiple domains in one regex rule. Example: provider1\.com|provider2\.com|provider3\.com

Learning track: How to set-up GA4?

This article is part of the learning track: "How to set-up GA4?" In this step-by-step guide, we’ll walk you through the entire process of setting up your GA4 tracking. You don't need any prior experience with setting up GA4 to follow these steps. Explore the other articles in this learning track below.

Discover this track

Join the community

Level up your analytics skills in our free Discord community.

Join MeasureBase
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.