How to Exclude IP Addresses in Google Analytics 4 - Go Fish Digital
Request Proposal Toggle Menu

How to Exclude IP Addresses in Google Analytics 4

How to Exclude IP Addresses in Google Analytics 4 featured cover image

When working in the world of website analytics, you might find yourself visiting a client’s website 5, 10, or maybe even 15 times a day. These website visits from data analysts like yourself can skew your data, especially if you are working with a business receiving low website traffic. For more accurate Google Analytics 4 results, you will want to exclude the IP addresses of all the analysts at your company monitoring the website performance of a client. 

IP Address Collection in GA4 

To align with the most up-to-date data privacy laws, IP addresses are not stored in GA4. IP anonymization is automatically turned on in Google Analytics 4 and can’t be changed.  

However, despite the IP anonymization features of GA4, you can still block specific IP addresses from internal traffic. Blocking an IP address will not allow any website actions from a user to show up in GA4. 

The Steps 

There are several ways you can exclude an IP address. The method below details how to block an IP address using the settings within GA4. 

Part 1: Define Internal Traffic 

  1. Admin > Data streams > Click on the data stream for your website
data stream

2. Configure tag settings > Show more > Define internal traffic 

internal traffic

3. Create >  Fill out all the fields in the Configuration window > Create

Fields to complete include the following: 

Rule Name: [any unique name you want to use to define the IP address you are excluding] 

  • traffic_type valueinternal 
  • Match type: IP address equals
    • Use IP address matches regex if filtering multiple IP addresses 
  • Value: [the IP address number]
    • You can use a site like What is my IP address to find your IP address number. 
    • You can string multiple IP addresses together in the value box by creating a regular expression. If you are not a regex expert, you can ask ChatGPT to combine multiple IP addresses together as a regular expression. 

Part 2: Create a Data Filter 

Now that you have defined what internal traffic should be excluded, you want to follow the steps below to create a data filter so this internal traffic is actually blocked. 

1.Admin > Data filters > Create filter 

ga4 data filter

2. Internal Traffic > Fill out the Filter details Create 

Fields to Complete include the following: 

  1. Data filter name: [any unique name to define the filter] 
  2. Filter Operation: Exclude 
  3. Parameter Value: [whatever value you put for traffic_type value in Part 1] 
  4. Filter State: Active 
internal filter creation

Conclusion 

After following the above steps, you should notice a drop in the number of users in GA4, which indicates that you correctly blocked the IP addresses. Excluding IP addresses gives you the freedom to open and click on websites all you want without worrying about messing up data integrity. 

About Abby Reed

MORE TO EXPLORE

Related Insights

More advice and inspiration from our blog

View All

How To Export Google Analytics Data To Excel

Google Analytics data organization and filter options can help you avoid...

Abby Reed| September 14, 2024

Best Training Courses for Google Analytics 4 (all different levels)

If you are looking to get started using GA4 or ready...

Abby Reed| August 20, 2024

The Best Conversion Rate Optimization Tools In 2024

If you are on the hunt to find the best Conversion...

Abby Reed| July 14, 2024