facebook google plus twitter
Webucator's Free Google Analytics Tutorial

Lesson: Understanding Filters in Google Analytics

Welcome to our free Google Analytics tutorial. This tutorial is based on Webucator's Introduction to Google Analytics Training course.

In this lesson, you will learn how to setup a filter in Google Analytics.

Lesson Goals

  • Best Practices for Setting Filters in Google Analytics.
  • How to Apply Filters in Google Analytics.

Introduction to Filters

Why and When to Use Filters in Google Analytics

Filters are used to clean and segment your data.

  1. Filters provide segmentation to gain a better understanding of a particular subset of activities happening on your website.
  2. Filters help in customizing the report so the most useful data can be highlighted.
  3. Filters can also help in cleaning up unwanted data such that irrelevant information is filtered away.

Understanding How Filters Act on Your Data

When a filter is created within your profile, it is immediately applied to new data coming into your account.

New filters will not affect historical data and it is not possible to reprocess your old data once it passes through a filter.

Tips: It is highly recommended that you keep the raw data intact by not applying any filters to your original profile. Create a duplicate profile for applying filters.

Overview of Different Types of Filters

Google Analytics provides you with three predefined filter types and several customized filters.

Filter Name Explanation
Exclude all traffic from a domain Excludes traffic from a domain that you specify. Applies reverse lookup and can filter out traffic from an ISP or the company's internal network.
Exclude all traffic from an IP address Excludes traffic from a single IP address or range of IP addresses. Useful in filtering the company's internal traffic.
Include only traffic to a subdirectory Includes only those visitors who are viewing a particular subdirectory on your web site. Useful in tracking a particular section of a web site e.g. www.yoursite.com/customercare.

Understanding Best Practices for Setting Filters

Always keep the default profile without applying any filters.

Adding more than one include filter to a profile can cause data to not appear in your reports e.g. if you use include filters to only include certain IP addresses, then traffic from all other IP addresses will be ignored.

Filters are executed sequentially in the order they are listed in your settings. Thus, output from one filter serves as input for the next filter. Thus, it is important that you apply filters in a correct logical manner.

To setup filters, open up your desired profile, and navigate to the 'wheel' on the top right of your screen. Once you open up all of your settings, you'll see options to add in Filters. See screenshot below.

Custom Filter

Introduction to Custom Filters in Google Analytics

The following types of filters are available for customized filter options:

Filter Type Explanation
Exclude Pattern Excludes log file lines that match the filter pattern
Include Pattern Includes log file lines that match the filter pattern
Search & Replace Searches for a pattern within a field and replaces the found pattern with an alternate form
Uppercase / Lowercase Converts the contents of the field into all uppercase or all lowercase characters
Advanced Combines two or more separate fields to construct a single field

Application of Predefined Filters

Duration: 10 to 20 minutes.
  1. Apply an exclude filter to filter all the internal visitors from your company.

Solution:

  1. Select an appropriate account from the Analytics Settings page, (e.g. RemoteCourse).
  2. Click on the Filter Manager tab and then select Add Filter.
  3. Provide the filter name (e.g. Internal Traffic Excluded).
  4. Select the settings as shown in the following screenshot under the area marked as Filter Settings.
  5. Enter the correct value of your own IP address. You can check your IP address now by going to www.CheckMyIP.net.Google Analytics Sign Up Page
  6. Add the profile on which you would like the filter to act.
  7. Click Save Changes.

Exercise on selecting appropriate filters

Duration: 30 to 45 minutes.

Please choose which filter you would apply in the following scenarios and create the same in your individual profiles:

You would only like to segment data related to a particular geographical location, such as excluding all traffic from the Asia Pacific Region in a separate profile.

Solution:

  1. Select an appropriate account from the Analytics Settings page such as RemoteCourse.
  2. Click on the Filter Manager tab and then select Add Filter.
  3. Provide the filter name such as Asia Pacific Region.
  4. Select the settings as shown in the following screenshot.Custom Filter
  5. Add the profile that you would like the filter to act on.
  6. Click Save Changes.

Once the filter is processed you can see the Asia Pacific region listed in the User Defined reports.

You would like to eliminate users coming from the Yahoo! search engine.

Solution:

  1. Select an appropriate account from the Analytics Settings Page such as RemoteCourse.
  2. Click on the Filter Manager tab and then select Add Filter.
  3. Provide the filter name, such as Yahoo Exclude.
  4. Select the settings as shown in the following screenshot.Custom Filter
  5. Add the profile that you will like the filter to act on.
  6. Click Save Changes.
Instead of showing a meaningless product URL in all your reports, you would like to see a product name associated with that URL. Create a filter that accomplishes this task.

Solution:

  1. Select an appropriate account from the Analytics Settings page such as RemoteCourse.
  2. Click on the Filter Manager tab and then select Add Filter.
  3. Provide the filter name such as Seach and Replace.
  4. Select the settings as shown in the following screenshot.Custom Filter
  5. Add the profile that you will like the filter to act on.
  6. Click Save Changes.
  • You would like to include all new visitors in a separate profile so they can be studied in greater detail. Apply the appropriate filter(s) to accomplish this task.

    Solution:

    Separating New Visitors.

    1. Select an appropriate account from the Analytics Settings page such as RemoteCourse.
    2. Click on the Filter Manager tab and then select Add Filter.
    3. Provide the filter name such as Only New Visitors
    4. Select the settings as shown in the following screenshot.Custom Filter
    5. Add the profile that you will like the filter to act on.
    6. Click Save Changes.
  • Apply filters to collect data pertaining to a sub-directory in a separate profile.

    Solution:

    Include data from Sub-directory.

    Solution:

    1. Select an appropriate account from the Analytics Settings page such as RemoteCourse.
    2. Click on the Filter Manager tab and then select Add Filter.
    3. Provide the filter name such as Onsite Courses Only
    4. Select the settings as shown in the following screenshot.Custom Filter
    5. Add the profile that you will like the filter to act on.
    6. Click Save Changes.