About view filters

Filter and modify the data in a view.

Use filters to limit or modify the data in a view. For example, you can use filters to exclude traffic from particular IP addresses, include only data from specific subdomains or directories, or convert dynamic page URLs to readable text strings.

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.example.com or support.example.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 alternate 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.

Common Uses for filters

Here are some of the ways 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 company intranet), you can set up a filter that identifies all of the IP addresses you'd like to exclude.

Report on activity in specific directories
If you want to report on activity in only a specific directory, set up an Include filter that identifies only that directory.
If you want to report on activity in all but a specific directory, set up an Exclude filter that identifies only that directory.

Limitations of filters

View filters are subject to the following limits and caveats:

Filters are destructive. Filtering your incoming hits permanently includes, excludes, or alters those hits in that view, according to the type of filter. Therefore, you should ALWAYS maintain an unfiltered view of your data so you always have access to your full data set.

Filters require up to 24 hours before they are applied to your data.

Fields specified in a filter must exist in the hit and not be null in order for the filter to be applied to that hit. For example, if you are filtering on Hostname, but the hit does not contain that field (perhaps the hit was sent via the Measurement Protocol and that request did not contain the &dh parameter), then any filters acting on Hostname will be ignored and the hit will be processed as if there was no filter.

Filters are account-level objects. If you edit a filter at the view level, you are also changing the filter at the account level, and any other views that use the filter are also affected by the change. If you want to customize a single instance of an existing filter used by multiple views, create a new filter and apply it to that single view.

Filters are applied after your data has been processed. Creating a filter to change the scope of dimensions is not possible.

Use filter verification to make sure your filters are performing as expected before applying them to your incoming data.