Bryce Mickler

Bryce Mickler - Web developer, finance guy, and entrepreneur from Dublin, Georgia USA

I am a web developer, accountant, and business grad living in the metro Atlanta, Georgia area.  You should contact me if you need help with:

Home About Me Bryce Mickler's Blog Web Analytics - Using Filters with Google Analytics
Web Analytics - Using Filters with Google Analytics
Written by Bryce Mickler   
Saturday, 12 September 2009 17:11

 

One of the most important things that a web master can do when implementing analytics is to filter out his own visits.  If your're using Google Analytics then this can be accomplished by setting up a custom filter.  A filter will remove visit records depending on the criteria that you set up.

In this article I will show you how to set up filters in Google Analytics that will filter out visits from a particular IP address, and IP address block, and a domain.

Of course, filtering out your own visits doesn't have to be the only reason that you use filters.  Often times one might want to block visits from competitors or other traffic sources.

To follow along with this tutorial I will assume that you have installed Google Analytics on your website and that you are logged in and viewing the main "Settings" page.

 

The Google Analytics Main Settings Page

 

At the bottom of the main "Settings" page you will notice the link to the Filter Manger.  Click it to open the Filter Manger.

 

Link to the Filter Manager in the Google Analytics main settings page

 

Alright, let's get started.

Using Filters to Filter Out a Single IP Address

I have a static IP address from my ISP at the house.  Since I do quite a bit of work from my home computer I would like to make sure that visits from there to my websites are filtered out.  I want to make sure that my traffic data is as representative of my audience as it can be without my traffic skewing it.

I'm going to set up a new filter by clicking on the "Add Filter" link.

Adding a new filter in Google Analytics

 

You'll now see the "Create New Filter" page where you will configure everything.  In this example I've selected the option to filter out a single IP address.

Setting up a new filter to filter out a single IP address  in Google Analytics

Give your filter a name, select the option to exclude all traffic from an IP address and move down the page to the "IP Address" field.  Before you enter in your IP address, remember that your external IP address may be different from your internal network IP address.  Simply opening a terminal or command prompt screen and typing

user@localhost:~$ ifconfig

or

C:\WINDOWS>  ipconfig /all

will most likley get you your internal IP address given to you by your DHCP server or DSL router.  What you need to enter in this field is your external IP address as the internet sees it.  Go to whatismyip.org to quickly find out your external IP address.  I like using that site because all you see is your external IP address, no ads or frills.

Enter your external IP address into the field.

Next you should choose which of your domain profiles this filter should be applied to.  If you have only one, click to select it and then press "Add" to apply this filter to that profile.

When you're done press "Save Changes".  That's it!

 

Using Filters to Filter Out an IP Block (Range of IP Addresses)

 

You can also filter out visits to your site coming from a range of IP addresses, also known as an IP block or 'block of addresses'.

Using the steps above, create a new filter and give it a name.

Setting up a filter to block a range of IP addresses in Google Analytics

 

  1. Select the option for a custom filter (1).
  2. Choose 'Exclude' for the filter rule type (2).
  3. Now choose the 'Visitor IP Address' option from the Filter Field (3).

 

Next we'll enter in a regular expression into the 'Filter Pattern' field that describes the range of addresses that we wish to block.  If you're well-versed in regular expressions, feel free to charge on ahead.  For the rest of us, Google has a page in the analytics help section that will create the regular expression for you.  Once you've got the regular expression, copy and paste it into the 'Filter Pattern' text field.

Next you should choose which of your domain profiles this filter should be applied to.  If you have only one, click to select it and then press "Add" to apply this filter to that profile.

When you're done press "Save Changes".  That's it!

 

Using Filters to Filter Out Traffic From a Particular Domain

 

Setting up a filter for traffic from a particular domain is very similar to setting up a filter for a single IP address.

Click the 'Add Filter' link and give the filter a name.

For the 'Filter Type' select the 'Exclude all traffic from a domain' option.

Now, type in the domain name of the domain whose traffic you wish to filter.

Setting up a filter in Google Analytics to block traffic from a particular domain

 

Next you should choose which of your domain profiles this filter should be applied to.  If you have only one, click to select it and then press "Add" to apply this filter to that profile.

When you're done press "Save Changes".  You're done!

I hope this helps you on your analytics journey.

 

Spread the Good Word

If you enjoyed this article, consider sharing it on one of these social bookmarking sites.


blog comments powered by Disqus