Home / Blog / How to Exclude IP Addresses in Google Analytics 4
How to Exclude IP Addresses in Google Analytics 4
Published: December 22, 2023
Share on LinkedIn Share on Twitter Share on Facebook Click to print Click to copy url
Contents Overview
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
- Admin > Data streams > Click on the data stream for your website

2. Configure tag settings > Show more > Define 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 value: internal
- 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

2. Internal Traffic > Fill out the Filter details > Create
Fields to Complete include the following:
- Data filter name: [any unique name to define the filter]
- Filter Operation: Exclude
- Parameter Value: [whatever value you put for traffic_type value in Part 1]
- Filter State: Active

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
Customer Lifetime Value: The Key to Profitability When CAC Keeps Rising
CAC is climbing, but profits don’t have to shrink. Learn how...
Lauren Lyster| September 30, 2025
Why Clicks Don’t Count: What the Best CMOs Are Tracking Now
Clicks don’t tell the whole story anymore. AI is reshaping how...
Kimberly Anderson-Mutch| August 05, 2025
4 Email Hacks to Improve ROI Short & Long Term
This is not just a post about email marketing. This is a...
Gregg Hecht| July 25, 2025





