Two Must Have Filters for Google Analytics

Google Analytics is a very powerful tool that every website should have installed. Those who have browsed through their analytics report know how valuable the information can be for improving conversions and making informed business decisions. As a result, webmasters and marketers must make every effort to ensure their data is as accurate as possible.

To help accomplish this task, Google Analytics has given us the wonderful ability to filter data to our needs. And while there are many different filters you can use for a variety of reasons, there are two filters every webmaster should create upon first installing Google Analytics. These two filters are an absolute must, and failing to implement them may contaminate results and provide you with inaccurate information.

1. Exclude All Employee IP Addresses

The first filter you should create when installing Google Analytics is a filter excluding yours and your employees’ IP addresses.

Why It’s Important

Not only will your employees inflate the number of visitors to your website, but more importantly, they may skew more sensitive data such as the number of pageviews and the time on site, since their browsing habits may be very different than a customer’s.

How to Exclude a Single IP Address

Creating this filter is very straightforward. From your Analytics Settings page click “Edit” to the right of the domain you wish to add the filter to. This brings you to your Profile Settings Page where you click “Add a Filter”. Select “Predefined Filter” and add your IP address (as shown below).

analytics add filter image

How to Exclude Multiple IP Addresses

If you have a range of IP addresses to exclude, select “Custom Filter” and enter the IP range using regular expressions. I suggest using Google’s IP Regex tool to make sure you are entering the correct expression.

2. Include Only Your Hostname

Why It’s Important

Including your domain name and subdomains is an often overlooked but vital filter. Remember that the tracking code Google gave you to use on your website (the UA-XXXXX-X) isn’t a secret. Anybody can see it pretty easily by looking at the source code of your webpage. If somebody uses this same tracking code on their page it will contaminate your data.

You may think this is a rare occurrence, but unfortunately it is very common. Most of the time it is done on accident, when somebody scrapes your code. But it could also be done maliciously. To see if anyone is using your tracking code on their website simply check your analytics under Visitors > Network Properties> Hostnames. We did this for and found more than 40 websites using our tracking code, including a hilarious example of a Chinese website that has scraped our code. Can you tell which one is the real website screenshot

fake seocom website screenshot

While this may not be that significant to a larger website like ours, it can really have an impact on small- and medium-sized websites by skewing metrics like bounce rates and average time spent on site. Furthermore, if somebody wanted to be malicious they could even include your code on a larger website, inflating visitors and making it harder to segment out traffic that is not yours.

How to Include Your Hostname

Including only your domain name is also pretty straightforward, although you will have to use a custom filter since there is no predefined filter available. To do this, select “Custom Filter” and “Include”. You then select “Hostname” from the drop down menu. To enter you domain name as a regular expression you simply need to add a “” before the .com:

analytics custom filter image

Always Have an Unfiltered Profile

While these two filters are extremely helpful, you will still want an unfiltered profile with only raw data. This is considered best practice since once you create a filter you can never go back to see unfiltered data, even if you made a mistake.

To create an unfiltered profile click “Add new profile” to the left of the domain name you want to add it to. Then enter a profile name such as “ – unfiltered”.

Taking these simple steps allows you to have more confidence in your data and make better informed business decisions.

Get Internet Marketing Insight For Your Company -


    • Christian Greiner says


      I have yet to find the Hostnames Report in the newest version. I know Google removed some of the lesser used reports so it might have been a casualty.

      I am hoping that users will be able to check their Hostnames Reports and implement the filter while they still have access to the previous version. With any luck Google will add it back in before v5.0 goes out of Beta (but I doubt it).

      • Ryan Smoke says

        Paul and Christian,

        Google has moved the Hostnames report to a sub-report within Visitors>Technology>Network. It should say Viewing: Service Providers Hostname on the left above the table. Simply click on Hostname and there you have it!

        Great article by the way!

  1. Moses Jones says

    I wasn’t too eager to use Google Analytics until this article has pointed out that I can filter out IP Addresses. I have noticed that Google Adsense counts all page views including page views that are given by you. This has given me a false impression of my traffic and caused confusion as to why I wasn’t getting clicks.

    I can get a better idea about how many page views my website is getting because of that feature.

    • Christian Greiner says

      Cameron, good point.

      This becomes an issue if you have multiple domains that you track within the same profile. To include both in your Hostname filter you will want to use a pipe bar between your domains in the regular expression. For example,|

      This will make sure both are included.

      • Sam says

        This is really helpful. Thanks for the tips!
        I have a realated question regarding subdomains (especially www). Do those need to be added as well, or is the root domain sufficient?

Leave a Reply

Your email address will not be published. Required fields are marked *