How To Use Google Analytics View Filters To Exclude Multiple IPs – WPSaviour

By WP Saviour •  Updated: 03/02/21 •  5 min read

Establishing Google Analytics is straightforward. You merely have to put in the Google Analytics monitoring code on the location and BOOM! Information begins flowing by your dashboard.

Proper? WRONG!

One of many largest errors most individuals make whereas organising Google Analytics is that they DON’T exclude inner IPs, and it’s possible you’ll be one among them.

What number of instances in a day do you verify your individual (or your shopper’s) web site? As soon as? Twice? Greater than ten instances? If it’s greater than that, you have skewed knowledge.

The answer is to make use of the view filters to exclude yours and your shopper’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

How one can Exclude Particular IP’s from Google Analytics for higher reporting:

#1 Exclude Subnet of IPs

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

You possibly can create a view filter with sort as ‘predefined’, then choose ‘exclude visitors from IP tackle that begins with‘ and paste the beginning a part of an IP  ‘192.168.0’


Doing so will filter out all of the IPs beginning with 192.168.0

For Eg:,, 192.168.0.three and so forth…

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

#2 Exclude IP Vary (Sequential)

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

I’ve seen lots of people creating ten totally different filters for every IP, a really time-consuming job. The easiest way is to use 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 Area as ‘IP Handle’
  3. Add ‘^192.168.0.[0-9]$’ within the filter sample


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

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

Lastly, save the filter.

#three Exclude Random IPs

Effectively, a lot of the instances that you must exclude the IPs of your house, workplace, cellular, and shoppers.

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 ^$|^$

Test the picture beneath.


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 Instrument To Confirm The Syntax

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


No worries.

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

You possibly can enter your Regex sample within the above row and paste all of the IPs you need to exclude within the ‘Take a look at String’ field.

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


If the IPs flip blue, these are matched.

If all the things goes effectively, 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 Take a look at Totally different IPs

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

One of many options is to vary the IP tackle.


You possibly can take a look at the IP addresses which you have got excluded through Regex filters one after the other and click on ‘replace’.

Tag assistant will re-analyze the reviews and present you if the hits are effectively filtered. You possibly can study extra about it right here.

Ultimate Ideas

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

So be sure to exclude inner IPs on the preliminary levels of organising the Google Analytics.

It is a visitor put up by Ritwik. If you need to submit one thing unique for Saviour then learn our submission pointers right here.

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

gp-6321545 as-4585854

WP Saviour

I am a WordPress specialist. My mission is to help you create beautiful websites with ease!