Chapter 6. Filters

There is no Google Analytics concept that is more important but less understood than filters. Functionally, filters are business rules. You add them to a profile when you have a business need to modify the data in a profile. For example, it is very common to exclude website traffic generated by internal employees. This data can skew the data generated by actual customers, thus causing incorrect analysis.

You can apply multiple filters to a profile to create data that meets your needs and the needs of your organization.

The key to understanding filters is understanding how Google Analytics structures website data. I discussed this earlier in Chapter 3; if you have not read that chapter, please do so.

There are two types of filters in Google Analytics: predefined filters and custom filters. Predefined filters are common filters that most people use. Google has bundled these common filters together and simplified their implementation.

Custom filters are different. You need to do all the configuration work when creating a custom filter. While it can be challenging, custom filters truly offer you advanced control over the data in your profiles.

In general, custom filters and predefined filters work on the same premise. Filters involve three components:

  • Filter field

  • Filter pattern

  • Filter type

As Google Analytics processes site data, it executes the filters that have been applied to the profile. When a filter executes, Google Analytics compares the filter pattern against the ...

Get Google Analytics now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.