Skip to: main navigation | main content | sitemap | accessibility page

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....

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 effec...

Comments

Grant

Grant

30/01/2018 09:57:54

Thank You! you have explained it in a simple way thank you very much :-)

Jimmy Steene

Jimmy Steene

12/12/2017 09:41:35

Like anything in Google Analytics, it's confusing sometimes. This was the easiest to understand and simplest instructions. My whole site is based on just this principal (smartphone education) I will definitely be bookmarking this site.

Nick

Nick

10/02/2017 09:01:53

You made it easy.....thanks:)

Tom

Tom

17/06/2016 06:15:46

I wish google could explain this as well as you have. Really good. Thanks

Gary Hall

Gary Hall

14/05/2016 06:25:17

Really useful - thanks :)

Jake Fox

Jake Fox

25/02/2016 08:44:45

Looks like the Filter set up was recently changed, now I can't figure out how to set one. Thanks again Google!

Marco Peters

Marco Peters

24/11/2015 04:06:23

How about excluding multiple IP ranges? Usually this will exceed the character (255) limit for RegEx.

Daniel

Daniel

15/11/2015 12:25:53

Great and easy to follow post! Will this update all of the data that has been collected to date and remove my IP address from the analytics?Thanks in advance!

Baadier Sydow

Baadier Sydow

12/05/2015 08:17:05

Thanks! I was trying to get rid of the office's users but couldnt for the life of me remember how! Old age :)

Tom Katte

Tom Katte

17/02/2015 11:04:03

Great post. For those of you who don't have the static IP address - you can easily filter your internal traffic using custom dimensions and Google Tag Manager: http://katteand.co/2015/02/16/filter-internal-traffic-without-using-ip-filters/

Dan Mantilla

Dan Mantilla

09/02/2015 04:50:07

Great post and tool. Thanks for sharing. Very helpful.

Young Yang

Young Yang

02/12/2014 09:44:21

This one nails it. Very clear! Thanks a lot, Paul.

Jared Tong

Jared Tong

01/12/2014 05:03:50

The first real answer to a very real problem. Thank you for this- it was remarkably hard to find the answer for a common problem!

K Tidwell

K Tidwell

24/09/2014 04:19:36

Thanks for the excellent article, Paul. Quick question - do you know if you can exclude a network IP or do they have to be the individual IP addresses for each machine/user? Thanks in advance!

Lucia

Lucia

21/09/2014 01:38:25

Mason, filtering is always done before data is processed, therefore any changes on filters are never retroactive. This means you can never recover data you filtered out even if you remove a filter.Google has a video that explains this nicely - it's called "Lesson 1.2 The platform components" - you'll find on the Google Analytic's Platform Principles playlist on YouTube.

Mason H

Mason H

27/08/2014 10:25:59

Thanks, Google didn't say it doesn't work retroactively so I figured it wasn't working...nice to know.QUESTION: If we later turn off the filter, will it then show that data retroactively (i.e. all visitors to the site both internal and external)?

Madelyn

Madelyn

19/08/2014 03:48:27

Hi. I've found a number of articles online which address excluding one or a range of IPs but nothing on excluding multiple ranges with ease. I've got a list of 83 IP addresses all ending with a wildcard so how do I exclude these without having to enter 83 separate filters? Any help would be great, thanks.

Philippa Mullett

Philippa Mullett

16/07/2014 07:15:52

Paul, one of the clearest, and best put together,articles I have yet to read on the web, and about a subject - and a company - that is not known for its clarity, accessibility or usability. Great use of text and images also. Thank you . I;m keeping Cognique on my radar for analytics help.

Srikar Reddy

Srikar Reddy

24/06/2014 06:19:03

Thanks Paul. I've been trying to exclude a range of IP addresses & this article helped me to exclude them easily. You explained it in this article clearly.

Phil Gregory

Phil Gregory

06/06/2014 09:37:11

Thanks very much for providing a nice clear, and technobabble free article.

Davidi Shirkey

Davidi Shirkey

03/06/2014 12:53:41

Thanks for this helpful article. This was just what I needed at the right time! Thanks a ton.

Hareesh

Hareesh

02/06/2014 09:44:50

Thanks. It was really helpful. :)

Subscribe

Join Our Mailing List