O'Reilly logo

Google Analytics by Justin Cutroni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Filter Type

The final part of a filter is the filter type. The filter type is the action applied to the data if the filter pattern matches the filter field. There are seven different types of filters, each with a distinct function.

Include/Exclude Filters

Include/exclude filters are the most common custom filters in Google Analytics. They’re also the easiest to understand. The action for an include filter is inclusion. This means that if the regular expression matches the filter field, the data is included in the profile.

Exclude filters operate in the opposite manner. If the filter pattern matches the filter field, the data will be excluded from the profile.

Include/exclude filters are extremely powerful because you can use them to segment your data in different ways. For example, to analyze the visitation habits of visitors from California, create an include filter like the one shown in Figure 6-2.

An include filter that lets in data from California

Figure 6-2. An include filter that lets in data from California

The result of this filter is that all data stored in the profile and displayed in the reports is for visitors from California (the Visitor Region field stores the U.S. state name).

Figure 6-3 shows a similar example that uses an include filter for visitors from New York.

A filter to include visitors from New York

Figure 6-3. A filter to include visitors from New York

Now, how ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required