Showing posts with label Google Analytics Channels. Show all posts
Showing posts with label Google Analytics Channels. 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.

Tuesday, September 25, 2018

What is Channel Grouping and how to automate the rules for multiple Google Analytics views?

Recently I was working on a small requirement where I had to update all the 13 views under a Google Analytics property's Channel grouping rules. The catch here is the updated rules for all the 13 views look the same. I started updating the rules for one view and at the end of updating for one view, I am completely tired. So I was scared about the task that's in front of me. Then, I hacked into the Chrome Developer Tools and wrote some code and boom I was able to automate the processing of entering the rules and save it all in one click.