Filters are a way to transform or manipulate the data that shows up in Google Analytics reports. Filters are applied on the data collected by Google Analytics and what you see in your reports is the final outcome after the filter has been applied to your data.
For example if you want to exclude traffic from an internal IPs then you setup an Exclude IP filter and apply it to the profile that you want to exclude the traffic from. The final reports that you will see in that profile won’t include any traffic from those IPs.
Note: Once the filter is applied then you won’t see the original data in your reports, you will only see the transformed data. So always apply a filter on a test profile before applying it to your main file so that you don’t accidentally mess up your reports in your main profile.
Google Analytics provides three predefined filters. If those are not the ones that you need then you also have an option to create custom filters.
- Traffic from the domains: This filter allows you to exclude or include only the traffic from a specific domain.
- Traffic from the IP addresses: This filter allows you exclude or include only the traffic from specified IPs.
- Traffic to the subdirectories: This filer allows you exclude or include only the traffic to particular subdirectory on your site.
Example of a Predefined Filter
- Exclude Pattern: Allows you to exclude traffic that matches the pattern that you specify.
- Include Pattern: This filter allows you to include only the traffic that matches the patter you specify.
- Uppercase: Allows you to convert a given data into uppercase.
- Lowercase: Allows you to convert a given data into lowercase.
- Search & Replace: This allows you to manipulate the information you see in your reports by searching a value and replacing with something else. Say you have called your campaign source as Gogle instead of Google in your campaign URL. You can change it back to Google in this filter.
- Advanced: This filter allows you to build a new data field from one or two other data fields. Some examples will be covered in future articles.
Examples of Custom Filters:
Note: Filters are applied in the Rank order, the rank 1 is applied first and then 2 and so on. To change the order use the Assign Filter Order button (see below). Having the wrong order on filter will lead to unexpected results so make sure you have assigned the right order.