Use Coupon Code ILOVEJENIUS for 10% off

How To Use Google Analytics View Filters To Exclude A number of IPs

Google Analytics View Filters To Exclude Multiple IPs

Establishing Google Analytics is simple. You merely have to put in the Google Analytics monitoring code on the positioning and BOOM! Knowledge begins flowing by your dashboard.

Proper? WRONG!

One of many greatest errors most individuals make whereas establishing Google Analytics is that they DON’T exclude inside IPs, and it’s possible you’ll be one in every of them.

What number of occasions in a day do you examine your personal (or your consumer’s) web site? As soon as? Twice? Greater than ten occasions? If it’s greater than that, you will have skewed knowledge.

The answer is to make use of the view filters to exclude yours and your consumer’s IPs from getting tracked in Google analytics.

Let’s check out how one can exclude:

  1. Subnet Of IPs
  2. IP Ranges (Sequential)
  3. Random IPs

The right way to Exclude Particular IP’s from Google Analytics for higher reporting:

#1 Exclude Subnet of IPs

Let’s say you wish to exclude all of the subnets of IPs beginning with, the place x is any quantity.

You’ll be able to create a view filter with kind as ‘predefined’, then choose ‘exclude site visitors from IP handle that begins with‘ and paste the beginning a part of an IP ‘’

Google Analytics View Filter Exclude IP Subnet

Doing so will filter out all of the IPs beginning with

For Eg:,, and so forth…

Save the filter and also you’re good to go.

#2 Exclude IP Vary (Sequential)

IP Vary may be any vary of sequential IPs, for eg:

  • –
  • –
  • & so on…

I’ve seen lots of people creating ten totally different filters for every IP, a really time-consuming job. The easiest way is to make use of REGEX to exclude the group of IPs in a single filter.

Right here’s how you are able to do it.

  1. Go to view filters and create a brand new one.
  2. Select Filter Sort as ‘Customized’ and Filter Subject as ‘IP Tackle’
  3. Add ‘^[0-9]$’ within the filter sample

Google Analytics View Filter Exclude IP Range Sequential

The above instance will exclude IP vary from to (10 IPs).

I gained’t go into a lot particulars about regex, however bear in mind these fundamentals:

  • ^ – denotes the beginning of the string
  • $ – denotes the tip of the string
  • | – denotes the ‘OR’
  • – denotes the escape character.
  • [0-9] – denotes any quantity from zero to 9

Lastly, save the filter.

#three Exclude Random IPs

Effectively, a lot of the occasions it’s good to exclude the IPs of your house, workplace, cell, and purchasers.

These IPs are neither sequential nor part of the identical IP subnet; they’re random.

In that case, you possibly can merely use the ‘OR’ in Regex which is denoted as ” | “. So when you’ve got random IPs, say &

You should utilize ^$|^$

Examine the picture under.

Google Analytics View Filter Exclude Random IPs

As we mentioned earlier ‘^’ denotes ‘begins with’, ‘$’ denotes ‘ends with’ & ‘|’ denotes ‘OR’ situation.

So, when you’ve got 5 random IPs, you possibly can merely put it on this format:


Click on Save.

Tip #1: Use Regex Software To Confirm The Syntax

Sadly, Google Analytics doesn’t present the ‘preview‘ for IP handle filters.

Google Analytics Preview Not Available

No worries.

You should utilize any Regex testing device obtainable on-line. One among them, which I take advantage of rather a lot, is Regextester.

You’ll be able to enter your Regex sample within the above row and paste all of the IPs you wish to exclude within the ‘Check String’ field.

I’ve included 4 IPs within the Regex sample and pasted the identical within the Check String field (together with one additional IP).

Google Analytics IP Filter Verify Syntax

If the IPs flip blue, these are matched.

If every little thing goes properly, you possibly can copy the identical expressions and add ^ & $ at the beginning/finish of every IP and use it in Google Analytics.

Tip #2: Use Tag Assistant To Check Completely different IPs

Tag assistant is a chrome add-on which lets you debug and check whether or not or not your Google tags are firing accurately.

One of many options is to alter the IP handle.

Tag Assistant Change Location

You’ll be able to check the IP addresses which you will have excluded by way of Regex filters one after the other and click on ‘replace’.

Tag assistant will re-analyze the studies and present you if the hits are properly filtered. You’ll be able to be taught extra about it right here.

Closing Ideas

Google Analytics filters are non-retroactive. i.e., the filters will solely alter the info transferring ahead.

So be sure to exclude inside IPs on the preliminary levels of establishing the Google Analytics.

It is a visitor put up by Ritwik. If you need to submit one thing authentic for ShoutMeLoud then learn our submission tips right here.

Additionally, listed here are a couple of hand-picked information so that you can learn subsequent:


    Leave a Reply