Showing posts with label Regular Expressions. Show all posts
Showing posts with label Regular Expressions. Show all posts

Friday, September 28, 2018

Google Analytics Filters - How to exclude CIDR IP Ranges with Regular Expressions?

In the last post, we have seen how to automatically add a list of rules and channel groups to multiple Google Analytics views. In the current post, let's look at the Filters in Google Analytics and we will take one specific case of excluding all the traffic given an IP Range (CIDR format) using Regular Expressions.

What are Filters?


This is pretty straightforward. Filters in Google Analytics provide you the way to include or exclude certain traffic which satisfies a set of predefined rules. Let's say you work for a big organization and all of its workforce access the company's website quite often and do a lot of activity. In this case, your data won't look as cool. Your analytics show a very low bounce rate and high page views which are not really true from a business standpoint. So, what you need to do is exclude this traffic from your organization machines. Another scenario where you want to analyze a specific section of people coming from a city alone. In both the scenarios, what you need to do is to create filters and create standalone views where these filters are applied.