One of the biggest mistakes most people make while setting up Google Analytics is they DON’T exclude internal IPs, and you may be one of them.
How many times in a day do you check your own (or your client’s) website? Once? Twice? More than ten times? If it’s more than that, you have skewed data.
The solution is to use the view filters to exclude yours and your client’s IPs from getting tracked in Google analytics.
Let’s take a look at how you can exclude:
Let’s say you want to exclude all the subnets of IPs starting with 192.168.0.x, where x is any number.
You can create a view filter with type as ‘predefined’, then select ‘exclude traffic from IP address that begins with‘ and paste the starting part of an IP ‘192.168.0’
Doing so will filter out all the IPs starting with 192.168.0
For Eg: 192.168.0.1, 192.168.0.2, 192.168.0.3 and so on…
Save the filter and you’re good to go.
IP Range can be any range of sequential IPs, for eg:
I have seen a lot of people creating ten different filters for each IP, a very time-consuming job. The best way is to use REGEX to exclude the group of IPs in a single filter.
Here’s how you can do it.
The above example will exclude IP range from 192.168.0.0 to 192.168.0.9 (10 IPs).
I won’t go into much details about regex, but remember these basics:
Lastly, save the filter.
Well, most of the times you need to exclude the IPs of your home, office, mobile, and clients.
These IPs are neither sequential nor a part of the same IP subnet; they are random.
In that case, you can simply use the ‘OR’ in Regex which is denoted as ” | “. So if you have random IPs, say 22.214.171.124 & 127.101.1.1.
You can use ^126.96.36.199$|^127.101.1.1$
Check the image below.
As we discussed earlier ‘^’ denotes ‘starts with’, ‘$’ denotes ‘ends with’ & ‘|’ denotes ‘OR’ condition.
So, if you have five random IPs, you can simply put it in this format:
Sadly, Google Analytics does not provide the ‘preview‘ for IP address filters.
You can use any Regex testing tool available online. One of them, which I use a lot, is Regextester.
You can input your Regex pattern in the above row and paste all the IPs you want to exclude in the ‘Test String’ box.
I have included four IPs in the Regex pattern and pasted the same in the Test String box (along with one extra IP).
If the IPs turn blue, those are matched.
If everything goes well, you can copy the same expressions and add ^ & $ at the start/end of each IP and use it in Google Analytics.
Tag assistant is a chrome add-on which allows you to debug and test whether or not your Google tags are firing correctly.
One of the features is to change the IP address.
You can test the IP addresses which you have excluded via Regex filters one by one and click ‘update’.
Google Analytics filters are non-retroactive. i.e., the filters will only alter the data moving forward.
So make sure you exclude internal IPs at the initial stages of setting up the Google Analytics.
This is a guest post by Ritwik. If you would like to submit something original for ShoutMeLoud then read our submission guidelines here.
Also, here are a few hand-picked guide for you to read next:
The world is going online. With the new infrastructural developments taking place globally, more and more businesses are opting to… Read More
Google Ads is bringing its Merchant Promotions program to Shopping Actions for retailers. This integration allows online retailers to add… Read More
The top AMP plugin for WordPress, AMP for WP, has released a released a patch for a critical security vulnerability.… Read More
A well-orchestrated PPC campaign can benefit a good SEO campaign, as Sergey Grybniak explores in How to Combine SEO &… Read More
Social Media Marketing Industry Report In our 10th annual social media study (44 pages, 70+ charts) of 5700+ marketers, you'll… Read More
Recently, our firm took over the digital marketing efforts for a small company. Their previous digital marketing efforts were led… Read More