Google Analytics is used to track how a visitors interact with our website. When our Google Analytics report contains data about internal and external traffic on our website, the statistics will be incorrect, as it is adversely affected by our own visits (internal traffic). This includes from our home, our office, and anywhere else we hit our website. It may also include our co-workers, or any member of our team. But we can stop Analytics from tracking our internal traffic by filtering our IP address.

Filtering internal traffic is even more important in early stages of our websites’ life. While our website has little traffic and we spend more time reviewing each of our web pages or performing unfinished development tasks, our activity is a greater per cent compared to the total activity. Not only changes noticeably the number of visits per session, but also the number of page views per visit, bounce rate and average time spent per user among many other parameters.

There are several methods to filter out internal traffic in Google Analytics. In this guide I’ll show how to use Google Analytics native feature - Filters for filter a range of IP addresses. For filtering a single IP address, please read another my article here.


  1. First, log in to your Google Analytics account.

  2. Select the website for which you want to create the filter. It can be selected from the list in the upper left corner of the page.

  3. Click the Admin button (image of the cog) at the bottom left corner of the page. How to filter a range of IP addresses in Google Analytics

  4. Click on the Filters. How to filter a range of IP addresses in Google Analytics

  5. Click the + New Filter button. How to filter a range of IP addresses in Google Analytics

  6. Let’s enter a name for the filter in the field “Filter Name”. I entered “Exclude internal traffic”, but if you’re adding several filters that relate to each other, such as your home IP address and work IP address, then get the filters a name that distinguishes them. How to filter a range of IP addresses in Google Analytics

  7. Select Custom from the predefined “Filter Type”. How to filter a range of IP addresses in Google Analytics

  8. Select Exclude from the list bellow.

  9. Select IP Address from the “Filter Field” dropdown list.

  10. In the field “Filter Pattern” enter the regular expression that matches your range of IP addresses. For example: ^74\.125\.19\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$. The easiest way to create the regular expression for the range of IP addresses is by using the IP Range Regular Expression Builder from Analytics Market.

  11. Click the Save button.


That’s it, we’re done. We’re now filter the internal traffic. So simple isn’t it?

One way to test our filter is to browse to a private page that no one else would have access to, and see if any traffic to that page gets recorded in our Google Analytics report.

If this article helped you then please leave a comment :smiley:

Thanks for reading!