Skip navigation
BLOG  |  MARCH, 2009

Filtering for Google Analytics

March 10, 2009 at 3:44 PM
by Brian

filtersThis blog post will discuss an important tool found within Google Analytics, namely Filters. Before we proceed, I would like to warn you that Filtering data is a very powerful tool. This powerful tool can both harm or help you, depending on if you use it properly. So, before you close this blog post and create filters galore, make sure to be one-hundred and ten percent sure you know what you are doing.

 

Glad you clicked the Read More Link

The best way to setup a test environment for multiple filters is to create multiple website profiles associated to the same website. That way, you will still have a backup of all the data that you have collected without any filters applied to it ( in case a filter was done improperly, or "that manager" decided that people with screen sizes below 800 x 600 are important ).
Example of website profiles and different filters

Default
-leave this one in tact as a backup and even comparison to your filtered stats.

Employee Free Metrics
-could be another profile with the following filters applied : Exclude IP addresses from Corporate Network, your IP address, etc.

Screen Size Filter
-could be another profile that filters out all monitors smaller than 800 x 600.

The Filters tool is found within Google Analytics, it allows you to refine your vast amount of metrics for more efficient data analysis. The image below is found when clicking the Analytics Settings link.

 

 

Once you predefine the Filters to suit your need, analyzing the metrics will be much easier.
There are underlying issues with setting up Filters. There is a good possibility that some valuable hits will be filtered out. However, this collateral of lost data is worth the amount of hours/days of extra time spent not worrying about irrelevant data. That is one side of the coin people do not like to think of, when setting up filters. 
However, on the opposite side of the coins - too much data up for interpretation can lead to mistaken assumptions. Your retailsason for filtering data can vary across the board. The end result is the same, you are filtering your data so that you can isolate what you want. There are two ways to isolate what you want, hiding irrelevant data or strictly showing data that concerns you. In this blog post, we will run through examples that encompass both of these ways.
When do I set up Filters?
When I think of Filters, I think of two categories in which they fall under. Proactive and Reactive filters.
*I must reiterate that creating a Filter will NOT apply to historical data. Also, once a Filter has been created and metrics have been collected, consider the filtered data lost.
Proactive filter
In my mind, a proactive filter will normally be set up prior to launching a new website, new marketing campaign through a webpage, a new contact me page, etc. A website is a maze of webpages, links, images, words and advertisements. Users using the website just want to get to the cheese as quick as possible. However, is gathering data from the “experienced mice” going to help you evolve your site to cater to “amateur mice” who are first time users? Also, will this “experienced mice” have a totally different user-experience that could potentially skew your data? The “experienced mice” in Newfangled’s case are the project managers, developers and point of contacts at the companies who are receiving our services. Therefore, the proactive filter would be : filtering out Newfangled’s IP address, the companies point of contacts IP address, and home IP addresses for those individual users who were integral to building the website, webpage, etc.
Reactive filter
So, a reactive filter is basically a filter that you have set up in response to a data set based over a period of time. Let us assume you are an IT company who charges X amount of money for your time. The developer of your website used an image called, new_computer.jpg on the page /how_we_help.html. While looking at your metrics, the marketing manager at your company shouts “1,274 page views on the how_we_help.html page is excellent!”. However, you being the knowledgeable one which in situations like these will always make you the bearer of bad news, informs the marketing manager that the bounce rate is 97% for that page. That means, only 39 people are actually staying on your site and clicking through to other pages. After further analysis, you notice that the predominant entrance keywords for this page are “new computer image”. The bounce rate for this keyword is 100% and page views is a walloping 1,000 and accounts for 78% of the traffic going to this page. So, you have two options set up a filter through Google Analytics or edit your robots.txt to block out indexing of those images. In this blog post, let us chose to filter out the referrals from Google images. Let us be honest, a person searching for an image of a new computer is not going to be interested in spending a couple hundred dollars for a few hours of your time. I would articulate how to set up this filter, but yoast has a great tutorial for it. So, what does this mean to you? If we had applied this filter proactively (which is tough to predict that the images on your site would be a large traffic source) The amount of page views would be 274. The bounce rate however, would be 14%! That means, the people who are interested in your services really LIKE that page and have found relevant content.
Hands on filter creation!
A vital part of creating filters is understanding Regular Expressions. I would recommend using the following links as tools to better understand Regular Expressions, tad bit more technical guide or more user-friendly guide. Regular Expressions are very confusing, but please do not let it dissuade you from creating an example filter. Trust me, understanding what, why and how is much easier by actually doing it.
Let us begin setting up one example filter together, a basic proactive filter. This filter will block the IP address of the creator of the website who will most likely be click spamming the website whenever he/she maintains it.
First log in to your Google Analytics account.
Click on the Filters Manager link. This is achieved by clicking the Analytics Settings link in the top-left hand corner. From that view, you should now be able to see the “Add Filter” link.

First, you’ll need to find his/her IP address : Grab your IP Address here. Using myself as the developer, I have acquired my IP address from the above URL. Go back to the Filter Manager and Add Filter.  Screenshot for the Add Filter link is below.

 

 add filter

 

 

When clicking the Add Filter link, you get the following page.  Screenshot is below. 

 

my analytics 

Not sure if you can see, but I have two website profiles set up. testing and www.mycollegeads.com/hls. Those two profiles are both tracking the same website. However, we can define which filters apply to which profile ( remember how I mentioned filters start working once they’ve been applied and you cannot bring back filtered data ).

Fill in Filter Name : Make sure it is something descriptive.
Filter Type : Pull the drop down to “Custom”.
Click the radio button : Exclude
Filter Field : Pull the drop down to “Visitor IP Address”.
Filter Pattern : 70\.62\.110\.210
The \ as well as . are considered regular expressions. The literal translation is : Filter out the data of the visitor with the IP address 70.62.110.210 . If you had not included the \ in the filter pattern, the . would represent any character. That means it could mean 70x62y110i210. Not exactly accurate! That is why we include the \.
Let us assume you have a range of IP addresses you’d like to block. 70.62.110.210 - 70.62.110.299. Instead of creating 90 different filters, you can use a slightly more advanced regular expression. Everything is the same aside from Filter Pattern which will read as : 70\.62\.110\.2[1-9][0-9] Just pay close attention to the .2[1-9][0-5] That signifies that you’re looking at a 3 digit number, 2 (any number between 1 through 9) and (any number between 0 through 9).
Meaning, we are excluding the range 210 - 299. I know some sly person out there is going to say, well what about 210 - 300. You will maintain the same format which is 70\.62\.110\.2[1-9][0-9] and add the following |70\.62\.110\.300
The | sign is also a regular expression that means OR. So, the same range is being covered OR 70.62.110.300. This will exclude the range 210 - 300.
If you require more examples of when these filters should be used, 7 useful filters to make data interpretation easier, is a very straightforward tutorial of some more basic filters. I will walk you through setting up one example so that you can acquaint yourself with the filters section of Google Analytics.
There are many places to find out more information about Google Analytics and how to filter your data, but the research starts with your own website. Knowing your website and your goals, will allow you to flesh out irrelevant data. My question to you is, what would you filter? and, what type of business are you?

Comments