BE Digital Knowledge base

Welcome to the BE Digital knowledge base, a source full of articles on digital topics. Our knowledge base is continually updated with the latest insights. We also regularly publish valuable whitepapers that offer in-depth analysis and advice. For the latest news and trends, visit our blog.

Jamie Schelling - BE Digital

Written by

Digital Marketing & AI Automation

Updated on 17 April 2024

Excluding IP addresses in Google Analytics 4

If you manage a website, you probably already know how essential it is to have accurate data on visitor behaviour. Google Analytics 4 (GA4), the latest version of Google’s analytics tool, offers advanced insights and data analysis capabilities. One of the most important steps you can take to safeguard the accuracy of your data is to exclude certain IP addresses from your data analyses. This can be especially useful for filtering internal traffic, such as visits from yourself and your team. Here is a step-by-step guide on how to exclude IP addresses in GA4.

Accessing GA4 and navigating to the right section

Log in to your Google Analytics account and select your GA4 property. Navigate to ‘Admin’ at the bottom left of your dashboard. On the ‘Admin’ screen you will find several columns; look in the ‘Property’ column for the ‘Data streams’ option.

Configuring the data stream

Click on the data stream from which you want to exclude internal traffic. Here you can see the details of your stream, including the types of data being collected. Look for a section called ‘More tagging settings’ and click on the option ‘Define IP addresses to filter’.

Adding IP addresses

In this section you can add specific IP addresses that you want to exclude. Here you can enter a single IP address, a range of IP addresses or a subnet. Once you have entered the address or addresses, save the settings.

Creating a data filter

After entering the IP addresses, navigate back to Admin and then click on data filter. Create a new filter, and use exactly the same ’traffic_type’ value that you used when adding the IP addresses. Then set the filter status to active and click save. 

Test your settings

After you have excluded the IP addresses and created the new filter, it is important to test whether the settings work correctly. You can do this by visiting your website from the excluded IP addresses and then checking in GA4 that these visits are not recorded. You can also use the ‘Realtime’ reporting feature in GA4 to see whether current visits are being filtered as expected.

Important considerations

  • Excluding IP addresses only works for data that is collected after the filter is implemented. Historical data is not filtered retroactively.
  • Make sure you regularly check whether the IP addresses you want to exclude have changed, especially if your company uses dynamic IP addresses.
  • Consider using additional filtering options for even more accurate data analysis, such as excluding specific locations or devices.
Correctly configuring your Google Analytics settings by excluding IP addresses can significantly help improve the accuracy of your site data and can provide essential insights for better business decisions. Need help excluding IP addresses? Get in touch with us and go through the steps together with an expert. 

Frequently asked questions

How do I exclude my own IP address in Google Analytics 4?

In GA4, go to Admin, choose Data streams under Property and open your data stream. Under More tagging settings, click Define IP addresses to be filtered and add the address. Then create a data filter with the same traffic_type value and set it to active.

Why should I exclude IP addresses in GA4?

It safeguards the accuracy of your data. It is especially useful for filtering internal traffic, such as visits from yourself and your team, so they don't pollute your data on visitor behaviour.

How do I test whether my IP exclusion in GA4 works?

Visit your website from an excluded IP address and check in GA4 that the visit is not recorded. You can also use the Realtime report to see whether current visits are being filtered.

Is earlier data also filtered if I exclude an IP address in GA4?

No, excluding IP addresses only works for data collected after the filter is activated. Historical data is not filtered retroactively. Also check regularly whether IP addresses have changed, especially with dynamic IP addresses.

Jamie Schelling - BE Digital

About the author

Digital Marketing & AI Automation

Jamie Schelling is a Digital Marketing & AI Automation specialist at BE Digital. She combines data, campaigns and automation to make digital performance visible and to improve it structurally.