The following guest post is from Rajeev Edmonds, also known as mintblogger. His blog was one of my favourites long before I got to know him through the Authority Blogger Forum. His vast technical knowledge of what you can do with Google Blogger and Google Analytics definitely surpasses my own. Today he discusses how to properly use filters in GA to exclude your own internal data (among other things). Enjoy!
************************************
Are you happy you’ve met the traffic goals at the end of the month? Hold on, the data displayed on your Analytics dashboard also includes the internal traffic (visits from staff/internal office network) on your web site. You may have hired some web developers living on the other side of the globe working on your web site. What about their visits while they work on your site? Their visits are also counted in your traffic. So, are you getting the true picture of actual number of genuine visitors coming to your site?
Here comes the role of filters that can be used to exclude visits from specific sources on your web site. Power users are able to harness the true power of filters with the help of custom regular expressions. In our case, we will see how to exclude visits from selective sources so that they do not count in our traffic statistics.
Excluding visits from a network
Let’s assume your company has two offices in different locations. One network has the IP range of 3.67.232.1 to 3.67.232.189 and the other has the IP range of 10.17.115.1 to 10.17.115.137. Now you want to exclude all visits from these two networks to get a better estimate about the actual number of visitors coming to your web site.
To achieve this, simply create a filter as shown below. I’m assuming you are currently in your Analytics dashboard.
1. Go to Analytics Settings -> Filter Manager -> Add Filter.
2. Give an appropriate name to the filter (for exp: ABC Inc Internal Traffic).
3. Select ‘Exclude all traffic from an IP address’ from the drop down list of Filter type option.
4. Now for first IP range our regular expression will be:
^3\.67\.232\.([1-9][1-9][0-9]1([0-8][0-9]))$
For second IP range, the regular expression will be:
^10\.17\.115\.([1-9][1-9][0-9]1([0-2][0-9]3[0-7]))$
For specifying more than one range, we have to separate both expressions with a ” pipe symbol. So the final expression becomes:
^3\.67\.232\.([1-9][1-9][0-9]1([0-8][0-9]))$^10\.17\.115\.([1-9][1-9][0-9]1([0-2][0-9]3[0-7]))$
Write this regular expression in the IP address field. If you find it difficult to create these expressions for your IP range, here is a handy tool to create regular expressions for a given IP range.
Note: In Google Analytics, the maximum allowable length of a regular expression is 255 characters. If your company has large number of networks, you have may have to create several filters to accommodate all IP ranges.
5. Next, you have to select the web site profiles on which this filter should be applied. Select the sites from the left side table and click Add >>. Click Save Changes to complete the filter creation process.
Now all visits from these networks will not be counted in your traffic and you will be able to get a better and clearer picture about the actual performance of your web site.
Excluding visit from a single IP
To reduce the complexity, I’m not discussing about excluding traffic from dynamic IP addresses. The process of excluding traffic from a single IP is same as shown above. All the steps are the same except the regular expression. Suppose, you want to exclude all traffic from IP address 10.31.119.45.
The regular expression for this IP will be 10\.31\.119\.45
Regular Expression Primer
The table shown below will help you in experimenting and creating your own regular expressions.
? -match zero or one of the previous item
. (dot) -match any single character
() -remember contents of parenthesis as item
- -create a range in a list
* -match zero or more of the previous item
-or
^ -match to the beginning of the field
$ -match to the end of the field
[] -match one item in this list
+ -match one or more of the previous item
\ -escape any of the above
If you are hungry for more, here is an excellent tutorial to learn regular expressions for Google Analytics. So what are you waiting for? Go ahead and use this extremely powerful feature of Google Analytics.
Rebecca Atkinson (Muller) is a freelance web marketing/analytics consultant with more than seven years of direct experience helping businesses create and implement online marketing and communications strategies. Her clients come from all industries including finance, technology and not-for-profit. She specializes in helping her clients determine how to improve their advertising programs, focusing on visitor behaviour – beyond the inital click-through. Full bio available
Wow! This is an incredibly in-depth article. Have you looked into other analytics tools like Tynt Tracer?
Trevor
Thanks – I’m glad you like the article. It’s definitely a good one. I’m pleased to have had Rajeev post here.
I have not heard of Tynt Tracer at all actually.