How to Exclude an IP Address from Google Analytics (3 Ways)

Blog Champs is reader-supported. By following through with a purchase, I may earn a commission at no expense to you. Thank you for your support.

Are you wondering how to exclude yourself from google analytics? I've got three solutions you can use to block yourself from analytics data.

Google Analytics will provide you with a lot of information about your website – including who visits it and what they do while there.

This can be incredibly helpful when you want to determine your most popular pages, find out which posts perform best (or worst), or understand the traffic sources that aren't converting well.

But this data might not be accurate if you don't exclude internal traffic. For this reason, you want to make sure to exclude your own visits from your website.

If you run a WordPress website or blog, you probably don't want your IP (Internet Protocol) address muddling your Google Analytics data. Fortunately, you can exclude a single IP address from Google Analytics with the following methods:

  • Google Analytics filters (method 1)
  • WordPress plugins (method 2)
  • Browser extensions (method 3)

NOTE: When applying any of the below methods, it takes a minimum of 5 minutes to take effect. Wait at LEAST 10 minutes before determining if the solution works!

Google Analytics Filters (Method 1)

You can block yourself from Google Analytics by using Analytic's built-in filter. This is a great solution for excluding static IP addresses. If your IP address (or the IP you wish to block) is dynamic (changing over time), this will not work.

To create an IP filter in Google Analytics, use the following steps:

  1. Grab your IPv4 address from whatismyipaddress.com
  2. Log in to your Google Analytics account
  3. Select your desired profile
  4. Select the Admin menu from the bottom left corner
  5. Click Filters from the far-right column
  6. Click the red Add Filter button
  7. Enter your Filter Name
  8. Select Predefined for Filter Type
  9. Select Exclude > traffic from the IP addresses > that are equal to
  10. Enter your IPv4 address
  11. Click Save
How to exclude an IP Address from Google Analytics - Filters
How to exclude an IP Address from Google Analytics – Filters
How to exclude an IP Address from Google Analytics - Add Filter
How to exclude an IP Address from Google Analytics – Add Filter
How to exclude an IP Address from Google Analytics - Enter IP Address
How to exclude an IP Address from Google Analytics – Enter IP Address

Pros

  • Reliable way to exclude static IPs
  • Can filter multiple specific IPs
  • Works when you are logged in and logged out of WordPress

Cons

  • Doesn't work for dynamic (changing) IPs
  • Doesn't work for cookieless tracking (GDPR compliant without consent) IPs
  • Need to add IPs from each Wi-Fi network you wish to block (home, work, school)

Rank Math Plugin (Method 2)

If you're using Rank Math, you can exclude all logged-in users from internal traffic. Note that this includes ALL logged-in users, not just administrators.

First, ensure you have the Analytics module enabled to enable this option.

How to Exclude an IP Address from Google Analytics (3 Ways) | rank math analytics module
How to Exclude an IP Address from Google Analytics

After enabling the Analytics module, click Settings or navigate to Rank Math > Analytics.

How to Exclude an IP Address from Google Analytics (3 Ways) | rank math exclude logged in users
How to Exclude an IP Address from Google Analytics

Click the Exclude Logged-in users toggle to turn it on and exclude your IP address from Google Analytics.

Pros

  • Works for dynamic IPs
  • Works for all logged-in users no matter their location

Cons

  • Requires Rank Math Plugin
  • Excludes all logged-in traffic (yours AND customers)
  • Doesn't work when you are logged out

MonsterInsights Plugin (Method 2)

The MonsterInsights plugin for WordPress also provides options for excluding specific user roles from Google analytics tracking. Conveniently, the default settings already exclude Administrators and Editors.

To edit these settings in MonsterInsights, navigate to Insights > Settings > Advanced.

Exclude user roles from GA with MonsterInsights
Exclude user roles from GA with MonsterInsights

Pros

  • Can exclude specific WordPress user roles
  • Works for dynamic (changing) IPs
  • Works for all logged-in users no matter their location

Cons

  • Requires MonsterInsights Plugin
  • Doesn't work when you are logged out

Browser Extensions (Method 3)

If your IP address is dynamic, this method will work to exclude your traffic from Google Analytics even if you are logged out (tested).

  1. Install the Block Yourself from Analytics Chrome extension
  2. Navigate to your desired website
  3. Open the browser extension from the upper right-hand corner (click the puzzle piece)
  4. Click Block Analytics for this website from the popup window
Add Block Yourself from Analytics Chrome extension
Add Block Yourself from Analytics Chrome extension
Open Chrome extensions with the puzzle piece icon
Open Chrome extensions with the puzzle piece icon
Launch Block Yourself from Analytics Chrome extension
Launch Block Yourself from Analytics Chrome extension
Click Block Analytics for this website option box
Click Block Analytics for this website option box

Pros

  • Works for multiple websites
  • Works for dynamic (changing) IPs
  • Works when you are logged in and logged out of WordPress

Cons

  • Requires browser extensions (some can't install at work or school)

Which Method Do I Use?

Because I'm the type of person who likes to be 100% certain of things, I combine methods 1, 2 & 3. I filter my IP address (static) from both work and home with GA filters, exclude logged-in users from Analytics with Rank Math, and block myself with the Chrome extension (installed on both my desktop and laptop).

FAQs

How to exclude yourself from Google Analytics?

The easiest method to exclude yourself from Google Analytics is by setting up a filter located in the admin settings under the Account and View section. The Account filters are account-wide, while the View filters apply only to the selected property.

What Is an IP address?

Every computer has an IP address that uniquely identifies it from all other computers on the internet. The Internet Protocol (IP) transmits data from one computer to another.

Conclusion

If you want to get accurate data from your website analytics, it's important to exclude your own IP address. Otherwise, you'll just be polluting your data and skewing your results.

Luckily, it's easy to exclude your IP address from your website analytics. All you need to do is add a simple IP filter. By doing this, you can rest assured that the data you're seeing is accurate and reflective of what your visitors are actually doing on your site.

If you're serious about blocking yourself from GA, I recommend you combine the 3 methods to ensure you don't pollute your Analytics data with your own traffic.

Method 1 (Google Analytics filters): Blocks static IPs from GA (logged-in, logged-out, and incognito mode, desktop and mobile devices)

Method 2 (WordPress plugin): Rank Math Blocks static and dynamic IPs from GA (logged-in only, desktop and mobile devices).

Method 3 (Browser extension): Blocks static AND dynamic IPs from GA (logged-in, and logged-out, desktop only)

From the table above, it's easy to see that not one method alone is sufficient for blocking your traffic from Google Analytics. Each method has its own strengths and weaknesses.

For even more assurance, avoid loading your website in private browsing modes, and make sure you're logged in to WordPress before you load anything.

Hopefully, this has been helpful for you. Let me know what you think in the comments below.

Photo of author

About the Author

Forced out of Colorado because of the housing market, Kyle now writes WordPress guides out of his Florida apartment, hoping one day to return to the mountains from which he came.
Why I Left SiteGround and How I Found My Next Hosting Provider

After many years with SiteGround, I finally made the switch, and I'm glad I did. Read the full story here.

8 thoughts on “How to Exclude an IP Address from Google Analytics (3 Ways)”

  1. Hi Kyle

    I like your approach!

    I have been trying to get the IP filters to work for a few months – they used to work for me until about 6 months ago. For my own traffic I exclude with the plugin that you also mention. But I’m still looking for a good solution to exclude other, especially people that I seek feedback from.

    One Reddit user suggested using campaign links and then setting up a filter for that campaign code. I liked the idea, but unfurtunately that didn’t work.

    Reply
    • Hello Simon,

      Thanks for the feedback. I’m curious as to how you know for sure the filters aren’t working. Also, try switching the filters to “Custom” and using a backslash before each period (e.g., 192\.168\.0\.1).

      Another option you can try is creating a segment that excludes the city you live in along with an unpopular browser, and then only access your website using that specific browser. This method, however, isn’t wise for websites with a local target audience.

      Unfortunately, eliminating 100% of your internal traffic with 100% certainty is difficult to achieve. Generally, though, using the solutions in this article is sufficient and your data is ~98% accurate. Unless you have a LARGE amount of unique internal traffic, I wouldn’t worry too much.

      Reply
  2. Hi Kyle

    Thanks for getting back to me! You have some good points here – unfortunately I feel like I’ve already been there for most of these things.

    The need: I have very low traffic for my therapist website and with my testing I can easily polute the stats heavily.

    Knowing filters don’t work: I check the live traffic and see my internal traffic immediately when I visit from phone – or any other browser than Google where I have the mentioned plugin.

    Things tried:
    1) I have tried the backslash solution – no effect,
    2) I have not made a such geo-filter – similary I could turn off all tracking while testing late at night, but I really want a good solution here.
    3) Recently began testing through Chrome with developer tools. In that way, the plugin still has effect and it might be my best fix for me.

    Again, these filters used to work for me with afaik no exceptions until some months back. I have reached out to Google and over the past weeks all I have heard is that they are asked new people in other departments.

    I have read and read around the web and I’m quite surprised that this can be so difficult to do.

    Reply
    • Are you using the Chrome extension as well to block yourself from google analytics? Try adding both WWW and non-WWW versions of your website to it.

      With Rank Math, you need to be logged in to exclude yourself, so always be sure that you’re logged in to your website. In addition, don’t visit your website anonymously through anonymous browsing modes or without being logged in.

      The filters don’t work on my phone either, but as long as I am logged in, Rank Math excludes me. And because extensions aren’t available for mobile devices, I limit testing to my desktop.

      Outside of these suggestions, unfortunately, there isn’t much else you can do. Tell me, is GA tracking you when you’re logged in to your website? If not, I would contact Rank Math support for help as well.

      Reply
      • It seems then that we have found the same – as long as I’m on Chrome on my computer the extension filters out the traffic. The problem is only on phone (or using other browsers on PC). So it’s mosly a problem in terms of getting feedback from others.

        But until Google hopefully improves on this matter, I’ll stick to chrome and ask feedback-givers to install the plugin.

        Thanks for your inputs again, much appreciated!

        Reply
  3. Hi Kyle
    Thanks for this thorough write up! Question, once the IP address is excluded, will it also apply to my GA stats retrospectively?

    Reply

Leave a Comment