Filters For GA Part 4c: Cascading Custom Advanced Filters

June 14, 2007

This is part of a series I am writing on filters for Google Analytics (and when I am all done, I promise to thread them all.) This current entry is a particularly beautiful capability of GA, but you might want to first read about Custom Advanced Filters if you aren’t terribly familiar with them (my most recent post in this series.) I will do just the tiniest review, else this will get too long.

Just the Tiniest Review: In a Custom Advanced Filter, you get a field A and a way to extract it into a Regular Expression, and if you like, a Field B and a way to extract that one into a RegEx, too. Then you can play with them — put them together, for example. That’s what output to constructor (the third area) is all about.

New: But what if you wanted to put together more than two fields? That’s a job for Superman Cascading Custom Advanced Filters. BTW, I made up that name. I haven’t found that one in the Google Analytics documentation, but I don’t know what to search under. (Now, if I could enter the contest, I would submit this entry. But the rules are, I can’t win.)

Back to business: so, let’s say that every day your boss wants a report that tells her what keywords people were searching on, what was the source, which ad they clicked on, how many pages they looked at and did they convert? None of this is hard in Google Analytics – the hard part is getting the information easily and quickly. What do you do when you have 50,000 keywords and you need the information for your boss every day? What do you do when your boss wants that report to also include geographic location and browser size?

(Note: Caleb Whitmore from POP (now from Analytics Pros), who taught me how to do cascading custom advanced filters and gets a ton of credit here, calls these Insane Filters, because, “who has time to look at 50,000 keywords every day?” And in fact, I have made my example here pretty simple compared to the one that I did for a customer last week, which included seven filters.)

So remember our fairly simple example: we are looking to get keyword – source – Ad Title – pages/visitor – conversion rate.

We start by creating a filter that will associate keyword (Campaign Term) with source, and we’ll dump in into Custom Field 1. If you are now a little lost , please read this post on how to create Custom Advanced Filters. Here is a screen shot:

Cascading Advanced filters 1

Now comes the “cascading” part. In this second custom advanced filter, we pick up Custom Field 1 as our A, we pick up the next thing we need, Ad Title, also known as Campaign Content, as our B, and we associate them in the constructor, but this time we put it into its ultimate resting place.

Cascading advanced filter 2

So what do I mean by that? With the final filter, you decide which report you are going to plop it all into — that’s what goes in the “output to” field. The decision on a report is important – the report you choose will give you specifics you might need. For example, if you want conversion rate, don’t drop it into your Top Content report (because you don’t get conversion rate there.) I have been using Visitor > Languages for this (but even if you have a seemingly obscure report like languages, you should create a custom profile for this work.) Notice that I didn’t do any work on pages/visitor or conversion rate, even thought I need it — that info will come automatically with the report, if I choose it correctly.

When you get the report, the first column will look like this:

shoes,google,Buy Red Shoes for $5

Right? First comes the keyword, then a comma, then the source, then a comma, and finally the name of the ad. This is how we associate more than two fields. The reason that I used seven filters for a customer last week was because they needed us to associate eight fields (i.e. you can keep doing this, and only in the last filter do you choose where to put the data.)

The other information (pages/visit and conversion rate) will be the same as always, in columns on the right. Plus there may be data you don’t care about, depending on the report you chose. Either way, all you need to do is export to Excel and voila! there is your report.

Tips and tricks: It is nice to use a comma in the constructor (i.e. like this: $A1,$B1) . That way, your file already has commas and separates nicely. However, depending on your data, you might have other commas get in the way. For example, just think of the mess you would make if your ad title was Shoes, Sandles, More — each of those would go into a separate cell in Excel. So a better way to go might be with a separator that isn’t used as often, maybe a slash or a star * or …. well , you get it. There is probably a way to get Excel to recognize those, but I generally have to export to a notepad and tell the notepad the name of the delimiter.

Also in the tips and tricks area, there is no reason that you can’t dump the whole thing back into your final field with each filter. So if you report is going to end up in Languages, you could always have every constructor go to Languages. But my advice is to resist that temptation and use the custom field until you get to the last filter. It’s a pain to get all your work done and start to get data, only to realize that the report you chose doesn’t work. If you use Custom all along the way, you only have the change the last filter.

Don’t forget that you can change the order of filters. This might be very important — you might need a different layout of your excel spreadsheet.

And finally — if you learned something here, please submit an entry to the Criticize Google Analytics Documentation contest. You have until June 26.

Robbin