Filters for GA Part 4c: Cascading Custom Advanced Filters


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.


Our founder, Robbin Steif, started LunaMetrics in 2004. She is a graduate of Harvard College and the Harvard Business School, and has served on the Board of Directors for the Digital Analytics Association. Robbin is a winner of a BusinessWomen First award, as well as a Diamond Award for business leadership. In 2017, Robbin sold her company to HS2 Solutions and has since retired from LunaMetrics.

  • Hey, great articles. I am trying to do some advanced filtering, but I’m confused by the “Field X Required” option. If I say “Yes” to the requirement, which of the following two things does that mean?
    [a] If the regex in this field does not match, do not include this hit in the profile at all.
    [b] If the regex in this field does not match, skip this filter, and move on to the next, but still include these hits in the profile.

    These two are obviously very different. Which does Google Analytics do?

  • Paul

    Hi Robbin

    I’d be keen to know the anwser to Idris’s question. I am also trying to play with custom advanced filters but the filters seem to be removing hits when all I want to do is alter the info from them slightly into the user defined field. I don’t want to remove any hits at all.


    p.s. great posts on the filters and regex.

  • Hi Paul, Idris’s post is my oldest email (in my inbox). I don’t know the answer without testing, and I just haven’t done it. But it is an easy test and I will set it now (because I am feeling guilty) and maybe I will have the answer by the end of the weekend…

  • Paul

    Thanks. That would be great to know!!

  • Thanks for such a nice article. In fact I implemented these advanced filters on about 5 or 6 different Analytics Accounts (of off course different websites) and found great results.

    All of these Analytics accounts were integrated with their respective AdWords Accounts and were show PPC queries in detail.

    However, from 23rd March 2009, these filters (I created new profile in each account to use these filters) suddenly stopped working. Now there is no PPC visits data all.

    AdWords campaigns for these accounts are still running. I can see AdWords data inside Analytics accounts in normal profiles.

    The new advanced profiles with advanced query filters still showing other (organic, referral) visits but no PPC data, not even simple PPC visits.

    It is strange as every thing was normal a week ago.

    Any reasons? has Google stopped supporting some of variables or ……………?

    Please help.

  • Atiq, you now have to enable “import cost data.” You do it by going to ADWORDS, switching to the analytics tab from there, and then in the very basic edit (the top part of the most general part of every profile), you will have a box to check. You can’t get at it from (you have to start in Adwords.)

  • Great post on “cascading” filters!

    I’d always been kinda choked at having only “Custom Field 1” and “Custom Field 2” available for holding data. I’ve been puzzling over how to generate a specific report with a bunch of data for a client, and I think I’ve now got what I needed. Thanks!

    With regards to the issue with using the comma in your constructor (“Shoes, Sandles, More — each of those would go into a separate cell in Excel”), Excel will not separate everything (Shoes, Sandles, More) if it’s enclosed in quotes.

    In your second filter (Now associate Content with Source and Keyword), your Constructor would be:

    This way the whole ad would go into one cell when you open the .csv in Excel. I just tested this out, creating a .csv in Notepad containing:
    shoes,google,”Shoes, Sandles, More”

    Opening it up in Excel, everything separates out into 3 cells properly. Interesting as well, the quotes get removed from the ad content…

  • Hey, thanks for this 😀 Have been fiddling around with these filters and getting some good results.

  • I’ve seen other articles about GA Filters but this is the first on cascading filters – but this is really well written and has much more detail – Thanks for sharing! *bookmarked*

  • Robbin

    Hi Bournemouth, glad you like.

  • Hey, got this link from the SEOmoz mozinar in Seattle and just wanted to say thanks for this info. So far it’s worked great! Got a few different campaigns to implement but hey, 1 step at a time right 🙂

    • Robbin

      @Brandon, glad you are enjoying. Amazing how I wrote it so long ago and it still is helpful…..

  • This is entirely foreign to me. What I do is write content based on keywords fed to me. I don’t know how Cascading Custom Advanced Filters work but what I gather from this blog is that it can be useful in analytical work. I know someone who is an IT expert and that is my boss. He’ll surely be able to follow this, if he doesn’t already know this by now. I know this is a useful tool in our work. I will refer your site to him. Thanks.

  • Kamilah Seratt

    Good day. Very cool web site!! Guy .. Excellent .. Amazing .. I will bookmark your blog and take the feeds also…I’m satisfied to locate so much useful info right here within the article. Thank you for sharing.

  • Thanks for the info I will be trying this out later.

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187