About view filters

The features described in this article are available only if you have the Edit permission.

Filters allow you to limit and modify the traffic data that is included in a view. For example, you can use filters to exclude traffic from particular IP addresses, focus on a specific sub-domain or directory or convert dynamic page URLs into readable text strings. Google Analytics supports two main kinds of filters: predefined and custom.

Predefined filters

  • Exclude/Include only traffic from the ISP domain : use this filter to exclude/include only traffic from a specific domain, such as an ISP or company network.

    When specifying the domain name, do not include the host server label (e.g. specify example.com, not www.example.com).

  • Exclude/Include only traffic from the IP addresses : use this filter to exclude/include only clicks from a certain source IP address.

    You can filter a simple range of addresses by using the that begin with or that end with options. If want you to filter a more complex range of addresses, use a Custom Filter to Exclude/Include using the IP Address and specify an regular expression as the Filter Pattern . See an example of using a regular expression.

  • Exclude/Include only traffic to the subdirectories : use this filter to exclude/include only traffic to a particular subdirectory (such as /motorcycles or /help/content/faq).
  • Exclude/Include only traffic to the hostname : use this filter to exclude/include only traffic to a particular hostname (such as sales.mydomain.com or support.mydomain.com).

Custom filters:

  • Exclude : This type of filter excludes log file lines (hits) that match the Filter Pattern. Matching lines are ignored in their entirety: for example, a filter that excludes Chrome also excludes all other information in that log line, such as visitor, path, referral and domain information.
  • Include : This type of filter includes log file lines (hits) that match the Filter Pattern. All non-matching hits are ignored and any data in non-matching hits is unavailable in the reports.
  • Lowercase / Uppercase : Converts the contents of the field into all uppercase or all lowercase characters. These filters only affect letters and do not affect special characters or numbers.
  • Search & Replace : This is a simple filter that you can use to search for a pattern within a field and replace the found pattern with an alternative form.
  • Advanced : This type of filter allows you to build a field from one or two other fields. The filtering engine applies the expressions in the two Extract fields to the specified fields and then constructs a third field using the Constructor expression. Read Advanced Filters for more information.

Here are some of the ways that you can use filters:

  • Exclude internal traffic from your reports
    If you'd like to exclude internal traffic from your reports (such as traffic from your home or company intranet), you can set up a filter that includes all of the IP addresses that you'd like to exclude.
  • Track activity in a specific directory
    If you'd like to report solely on activity in a specific directory, you can set up an Include filter. Likewise, if you'd like to see data for all but one or several pages or directories, an Exclude filter will take care of it for you.
  • Track subdomains in separate views
    Do you want to track www.example.com as well as help.example.com and info.example.com , but view separate reports for each one? You can easily accomplish this by creating a unique view for each one, and using an Include filter to return data on only the specified subdirectory .

For an overview of using filters, watch this video (available in English):

Setting basic filters

This video is part of the Digital Analytics Fundamentals course on Analytics Academy. View the full course at http://analyticsacademy.withgoogle.com.