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).
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 SEO.com 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 SEO.com?
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: seo.com
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 “www.seo.com – unfiltered”.
Taking these simple steps allows you to have more confidence in your data and make better informed business decisions.