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.
You need the Editor role at the account level to manage filters. See Create and manage view filters for more information.
- 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 you specify 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 you want to filter a more complex range of addresses, use a Custom Filter to Exclude/Include using the IP Address and specify a 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.example.com or support.example.com).
- 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.
- Track subdomains in separate views
If you want to track www.example.com as well as help.example.com and info.example.com, then create a separate view for each one, and use an Include filter to identify only the specified subdirectory.
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
&dhparameter), 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.
- Filters are not applied to product-scoped dimensions populated via data import. While you can create a filter based on product-scoped dimensions, if those dimensions are populated via data import, then that data will not be impacted by the filter.
Use filter verification to make sure your filters are performing as expected before applying them to your incoming data.
Learn how to create and manage view filters.
Learn more about filter types.