Filters in Google Analytics

Google Analytics is a fairly complete webanalytics program, but it has some flaws. As I showed in my article on Google Analytics tweaks, you can overcome many of these flaws with the use of tweaks. In this article I will show what you can do with custom filters and extra profiles on the same website.

What are Analytics filters?
Google Analytics filters allow you to select specific visits or visitors on your website and either show only them, exclude them from your reports, or change the way they show up in your reports.

Analytics Filter ManagerYou can enter filters in the “Analytics Settings > Filter Manager” section of your account when you have administrator rights. Here you can enter filters that “Exclude all traffic from a domain”, “Exclude all traffic from an IP address”, “Include only traffic to a subdirectory” or make your own filter under “Custom filter”.

What can I do with Analytics filters?
The first two filters mentioned before help you to exclude visitors that cloud your reports with unrelevant visitors, for instance visits from your companies own IP address. The subdirectory filter allows you to separate subsections of your website into separate reports. More on separate website profiles later, but first let me explain how you can use the “Custom filter”.

Custom filter
In the custom filter section you can include, exclude or edit information based on many variables before they are simplified and combined in your analytics reports. The most important pieces of information to use in your filters are: Request URI, Visitor IP address and Referrer, but others like country and language can always come in handy. A full list can be found here.

Custom filters can use POSIX regular expressions. This means you define what format or sequence the filter should look for and you can extract information from it. I like using the “Advanced filter” from the “Custom filter” section. There you can use one or two fields and combine extracts from them into another field.

Full referrer URLs
Under “Marketing Optimization > Visitor Segment Performance > Referring Source” or “Marketing Optimization > Marketing Campaign Results > Referral Conversion” Analytics shows only partially where your visitors have come from. For instance the get variables (for instance ?name=analytics-filters) are excluded and it isn’t easy to just enter the referrer URL and visit it. To get the entire referral URL into your report you can use a custom-advanced filter. Here’s how:

  1. Enter the Filter manager
  2. Click “+ Add Filter”
  3. Enter the filter name (like “Full Referral”) and select “Custom filter” from the drop-down box
  4. From the radio buttons you select “Advanced”
  5. For “Field A -> Extract A” you select “Referral” from the drop-down box and in the text field you enter “(.*)” (to select the entire URL)
  6. Leave Field B empty and set “Output To -> Constructor” to “User Defined”. In the text field you enter “$A1″ to refer to the first selection of field A.

It should end up looking something like this:
Filter Full Referral information

Within a day full referral information will end up under “Marketing Optimization > Visitor Segment Performance > User-defined”

What have Adwords searchers really typed?
Another flaw in Google Analytics is the report on Google Adwords. Analytics only shows what matching option was triggered by the users search query, not what was exactly typed. In my earlier article on Analytics I showed how to fix this with javascript, but you can also use filters to extract this data. Here’s how that goes:

Copy the following screen to get referral data of cpc clicks into “Custom field 1″ (this field cannot be seen in your reports)
Adwords term to custom field

Copy the following screen to combine the data of “Custom field 1″ and the original data of “Campaign term” into one
Custom field to adwords report

From now the all reports that include Adwords search terms will also include the used query.

Using extra profiles
New profile based on existing one
You can create extra profiles of the same website and filter specific traffic to only appear in all reports of that profile. I use this option to see if visitors that order something show other behaviour then other visitors, but you can also use it to differentiate Google traffic from Yahoo traffic, or new from returning visitors. This works in all your reports and you don’t need to use any cross segmentation within your reports.

Google Analytics can do almost anything expansive web analytics software can do. You just need to know how to retrieve the data.

Leave a Reply