Google Analytics Filters & Filtering

Jarret Streiner - February 2, 2012

Once you have Google Analytics tracking code installed on your site and data is starting to populate, there are few more steps that you should take to get the most out of your analytics account. Adding filters to your account will help you include and exclude information that will refine the analytics data and reports that you need.

Preferably, you should set up at least one profile in your account that does not contain any filters. Once you create a filter on any profile, Google Analytics does not have a method to go back and track the data that was filtered out.

Yet, on the other hand, if you wanted to filter out certain data points from being tracked e.g. all employee traffic or traffic from a sub-domain, then having at least one unfiltered profile is not necessary in this instance. You have 50 profiles at your disposal to set up filtering in as many different ways as you consider necessary.

To begin filtering site data, click on the Gear icon on the right side of the Google Analytics menu. Then you will see the screen above. Then click on +New Filter.

There are two types of filters available: Predefined or Custom. Predefined filters are limited to Excluding or Including traffic from IP addresses, domains, and traffic to subdirectories.

Why would you use these filters? Use these filters to eliminate unwanted hits such as internal site traffic or traffic from a particular IP range, collect data from certain directories of your site or track subdomain traffic separately.

The custom filters are more robust and give you a multitude of choices. You are able to Include and Exclude data patterns or set URLs to Lowercase or Uppercase. Setting the case type is essential due to Google Analytics being case sensitive and capturing data exactly as it appears in the location bar of the browser. This way all of your reports will be unified.

Within custom filters there is a Search and Replace filter, which is used to replace a matched expression with another string. This comes in handy when using page ids e.g. id=100 or id=200, as you can set a readable name for the numbers, 100=Tires, 200=Fuel Filters.

Past the Search & Replace filter is the Advanced filter which is used to reorder URLs. Running the Advanced filter will take the use of Regular Expressions. These expressions can use complete or partial text matches and include wildcards, which are a special symbols that stand for one or more characters.

Using the Advanced filter will change a longer URL
From:http://www.mysite.com/shopping?qsrc=43&o=0&x=ref&stf=FL:BR&q=red+chair
To: /shopping/o=0/qsrc=43/q=red+chair

For more information on filtering:
Clean up your Google Analytics data with these 5 filters

Watch our video tutorial on Filters: YouTube Link

Posted in: Analytics

© 2023 MoreVisibility. All rights reserved.