Trying to figure out how to exclude an IP address in Google Analytics?
The most common reason for wanting to block IP addresses is to exclude internal websites from showing up as traffic hits in your Google Analytics data. If your internal website is counting towards your traffic numbers, it can cause all kinds of skewed results.
That’s why it’s important to set up filters so that Google knows to exclude internal IP addresses from your website’s traffic data.
In this article, we’ll show you step-by-step how to exclude an IP address in Google Analytics 4, and if you’re a WordPress user, we’ll also show you a simple shortcut for how to block an IP address in Google Analytics.
Why Exclude IP Addresses in Google Analytics?
Google Analytics is a powerful tool for seeing how many people visit your site, which content brings in the most traffic, the products that perform the best, and a ton of other useful data about your site.
The hitch is getting Google Analytics to filter out all the data that you don’t want it tracking, like traffic from your internal IP address, as real traffic on your own website.
Google Analytics will track every user by default. So each time you load a page, you’re also loading the analytics tracking code. For WordPress users, that means that even when you preview a post, it will be tracked as page views on your site!
That can lead to really inaccurate data and difficulty finding the difference between your real visitors and your own visits. Google Analytics doesn’t have any predefined filters, which is why it’s important to know how to exclude multiple IP addresses from Google Analytics. That way, you can filter out your own IP address as well as any other admins, editors, authors, contributors, and users.
Does an IP Address Filter Make Google Analytics Ignore IP?
Yes and no. Here’s where an issue comes into play with GA4 filters. If you use Google Analytics to block an IP address, it will exclude traffic from your filtered IP address. However, many people don’t realize that they don’t have what’s called a static IP: an IP address that doesn’t change.
Most regular users have dynamic IP addresses, which means the address changes over time and without the user being aware of it. Plus, even if you’re using a static IP, it would change if you’re on a different wireless network, like at the library or coffee shop. Both situations translate to a new IP address for Google to start tracking again.
So we need Google Analytics to exclude internal traffic from dynamic IP addresses. Is it possible?
Yes! If you’re a WordPress user, there’s actually a very simple way of excluding IP addresses from Google Analytics, without relying on Google Analytics 4 IP filters.
Not using WordPress yet, but still want to set up a GA4 filter for internal traffic? Jump down to our instructions for GA4 – exclude IP address.
The Simple Way to Exclude an IP Address
The easiest way to filter multiple IP addresses and ensure that WordPress admins and other logged-in users don’t skew your analytics data is by using ExactMetrics.
ExactMetrics is the best premium WordPress Analytics plugin, allowing you to easily set up Google Analytics without editing any code or needing a complicated tool like Google Tag Manager. You get advanced tracking right out of the box with an extremely user-friendly interface and Google Analytics reports right inside your WordPress dashboard.
ExactMetrics also makes it incredibly easy to set up any extra Google Analytics metrics tracking, such as eCommerce tracking, form tracking, media tracking, and much more.
Plus, ExactMetrics makes it easy to exclude traffic from users anytime they’re logged into your site.
You don’t need to rely on a data filter in Google Analytics to exclude multiple IP addresses. The filter works regardless of whether your IP address changes or you connect to a different wireless network, so you won’t have to worry about how to filter internal IP addresses.
To get started, you’ll need to download and install ExactMetrics.
We recommend ExactMetrics Pro for access to all the best Google Analytics features and tracking. If you want to test it out first, check out how to get an unlimited free trial, where you’ll still have access to the Google Analytics address filters.
For a full tutorial on getting set up with ExactMetrics, check out How to Add Google Analytics to Your WordPress Site.
After you have ExactMetrics installed and ready to go, follow the next steps.
Step 1: Log in to your WordPress admin area and go to ExactMetrics » Settings. Now click on the Advanced tab at the top of the page.
Step 2: Under Permissions, find Exclude These User Roles From Tracking. Add the roles you don’t want to track in Google Analytics by clicking the +Add Role option:
By default, ExactMetrics excludes Administrators and Editors from tracking. But you can easily remove them with the X or add more roles to keep your data clean and accurate.
Once you’re done, scroll back up and click Save Changes in the top right corner.
There you have it! Google Analytics won’t track WordPress admins or any user role you’ve ruled out.
If you’re still interested in learning how to block an IP address from your website using the GA4 exclude IP filters method, keep reading.
Filter Google Analytics by IP Address (GA4)
The second way to exclude an IP address in Google Analytics is by setting up filter types in Google Analytics. This method can be complex for beginners. It can also be time-consuming and tedious since you’ll have to add filters for each individual user rule.
Keep in mind, GA4 internal traffic filters only work consistently for static IP addresses. So if you or your other users have a dynamic IP address or connect to a different network, you’ll need to create new Google Analytics IP address filters or at least account for the extra traffic when viewing your analytics reports and SEO.
Here’s the steps we’ll look at for how to filter Google Analytics by IP address:
- Find Your IP Address
- Find Your Website’s Data Stream in Google Analytics
- Set Up Internal Traffic Rule for Excluding IP Addresses in GA4
- Create Internal Traffic Rule to Exclude IP Address in Google Analytics
- Tell GA4 to Filter Internal Traffic by IP Address
Let’s get started.
Step 1: Find Your IP Address
First, you need to know your IP address. The easiest way is by searching What is my IP address or Track my IP in Google search.
After you’ve figured out which IP address or multiple IPs you plan to create filters for, you’re ready to head to Google Analytics and create a traffic block filter for your analytics data.
Step 2: Find Your Website’s Data Stream in Google Analytics
Log in to your Google Analytics account and select a property (the website you want to create a filter for):
After that, click on Admin at the bottom of the left sidebar:
Next, click Data Streams under the Property column, and click the data stream that your website is using to track traffic in Google:
Step 3: Set Up Internal Traffic Rule for Excluding IP Addresses in GA4
After that, scroll down and click on Configure Tag Settings:
Scroll down on the next screen and click on Show All:
Then you’ll need to click on Define internal traffic:
Step 4: Create Internal Traffic Rule to Exclude an IP Address
Now you need to create your internal traffic rule and parameters for excluding IP address in Google Analytics 4. You have to set up a rule in GA4 before it will create a new filter. Click the blue button that says Create:
Now you’ll make your exclude internal IP rule. Type a filter name, like “Main Office” and then use the drop down menu under Match Type to choose an option for how to exclude your IP address, such as an IP range or regular expression.
When you’re finished, click the blue Create button in the top right:
Step 5: Tell GA4 to Filter Internal Traffic by IP Address
You’ve created the rule, but Google won’t exclude the IP address from Google Analytics until you tell it to use that filter rule.
Go back to your main admin screen and click on Data Settings » Data Filters:
Next up you’ll see a screen with a filter that was created when you made your internal traffic rule with the data filter name: Internal Traffic. However, it’s only in testing mode right now and isn’t actually excluding IP addresses from Google Analytics yet.
To make it start filtering IPs in GA4, click on the arrow:
Scroll down and click the circle next to Active to turn it on. Now, make sure you click Save at the top:
You just learned how to filter Google Analytics by IP address!
Either method to exclude IP addresses in Google Analytics works, but we recommend using the first method since it’s much easier, doesn’t require a manual setup process, and is a much more reliable way to exclude internal traffic in GA4 by not relying on static IP addresses. Plus, it’s an excellent all-around digital marketing tool for analytics. Get started with ExactMetrics today!
We hope you enjoyed our article on how to exclude IP addresses in Google Analytics. You also might enjoy learning how to track PDF downloads in Google Analytics and how to track link clicks on your website.
Not using ExactMetrics yet? What are you waiting for?
And don’t forget to follow us on Twitter and Facebook for the latest tutorials on Google Analytics and WordPress.
Hi, any way to do the same on Google Analytics 4 properties?
Seems that the setting is missing.
Hi Manou,
Thanks for your question. ExactMetrics still has the setting under ExactMetrics » Settings » Advanced. As for excluding IP addresses with Google Analytics 4, yes, that has changed! Until we’re able to update our article, you can use Google’s instructions here: https://support.google.com/analytics/answer/10104470?hl=en.