How to exclude internal traffic from Google Analytics

Memo to all marketers: remove staff visits from your website traffic!

This blog post was last updated on 11 March 2016 to include changes made to Google Analytics prior to this date.

The heaviest users of a website tend to be people from within the organisation. So it makes sense to remove this group from your Google Analytics traffic otherwise your visitor figures will be artificially inflated by internal use. Your data will also be skewed by their behaviour, and have a detrimental effect on conversion rate optimisation.

What you need to know about IP addresses

Google Analytics collects and stores information about each visit to your website. While it cannot tell you any personal details about a visitor, it does record their public (internet accessible) IP address. Each public IP address on the internet is unique and points to a router, a box on the visitor’s internal network that connects their computers, tablets, smart phones etc. to the internet.

Most domestic broadband connections and even some smaller business connections have dynamic IP addresses. This means the address will occasionally change. In contrast most businesses and even the odd domestic broadband customer have routers configured with static IP addresses that don’t change. To exclude internal traffic from Google Analytics you need to find out what the public static IP addresses are for your organisation.

How to find your public IP address

To find your public IP address visit Google and type “what is my IP address” in the search bar. You public IP address will be displayed as the first search result. If you have multiple office locations then someone will need to do this at each location otherwise you will not be excluding all your internal traffic.

How to exclude a single IP address in Google Analytics

  1. Log in to your Google Analytics account and click on the Admin link shown at the top of the page.
  2. Click on Filters shown in the right column.
  3. Click the red +NEW FILTER button.
  4. Give the filter a name, for example the office location.
  5. From the dropdown lists select [Exclude] and [traffic from the IP addresses] and [that are equal to].
  6. Enter your IP address in the IP address box displayed below. Your IP address should be four numbers separated by three decimals points.
  7. Click the blue Save button.
  8. Mission complete – pat yourself on the back!

 Google Analytics Exclude Single IP

If you have IP addresses for other office locations, repeat the process above for each. If all the IP addresses are sequential then follow the instructions below for excluding a range of IP addresses.

How to exclude an IP address range in Google Analytics

Some organisations have a range (also known as a block) of sequential IP addresses. While you can still enter each individually using the instructions already given, this can be time consuming if the range is large.  Follow these instructions instead:

Visit this IP Range Regular Expression Builder page and follow the instructions, entering the first and last IP addresses in the sequential range before clicking the Generate RegEx button.

Regular Expression IP Range

Copy the regular expression code displayed in blue, like in the screenshot below:

  1. Back in Google Analytics, click on the Admin link shown at the top of the page.
  2. Click on Filters shown in the right column.
  3. Click the red +NEW FILTER button.
  4. Give the filter a name, for example, ‘Exclude Branch Locations’.
  5. Change the Filter Type to Custom Filter.
  6. Ensure the Exclude radio button is selected.
  7. Change the Filter Field to [IP Address].
  8. Paste the regular expression code generated earlier into the Filter Pattern field.
  9. Click the blue Save button.
  10. Phew! You’re done.

Google Analytics Exclude IP Range

Limitations of excluding IP address in Google Analytics

While the above methods aren’t foolproof if you have static IP address(es) and follow the instructions carefully it should eradicate most of your internal traffic. The only exceptions will be staff working offsite, either from home or other locations. It’s also worth noting that any IPs you exclude now will not have a retrospective effect on your historic data – only new data will be affected. The downside of this is that you may see a bit less traffic going forward but you will be safe in the knowledge that the data now accurately reflects your true external visits!

Would you like us to exclude your internal traffic from Google Analytics? Are you looking for other help with Google Analytics? Contact us for help with Google Analytics.

Share this article

Related Blogs

20Dec 17 

Get to grips with your web traffic with Google Data Studio

Struggling to find the stats you’re looking for in Google Analytics? Then you’re going to love Google Data Studio! A relatively new product from Google, Data Studio allows you to create at-a-glance reports from multiple data sources, including Analytics, Adwords and Google Sheets. And even better, since February this year, Google Data Studio has been free to use for all businesses. Why use Google Data Studio? Instead of having to go into Analytics and spend time unearthing the key statis...

12Jul 16 

How do I disavow backlinks in Google Search Console?

In previous posts we've explained why you should use Google Search Console, plus provided instructions on how to get set up. This is the first in a series on how to actually start using Google Search Console. A lot of the features of Google Search Console aren't something you need to use every day, and that's certainly the case with the disavow tool. In this blog, you'll learn how you can use Google Search Console to disavow backlinks, and why you might need to do that in the first place.W...

18Aug 15 

How to block referrer spam with Google Analytics filter

The most effective way to block ghost referrer spam from accessing your website and affecting your analytics data is to set up a custom filter directly in your Google Anaytics account. To find out if your website is affected read our blog post Is referrer spam affecting your website metrics?Set up a View in Google Analytics Before you can begin to use any of the techniques below we recommend setting up an additional view in Google Analytics. The benefit of views is that you can see the effect...

Join Our Mailing List