Filters for GA, Part 3a: Easy Implementation


I am writing a series on filters for GA. This is the first actual implementation post I am doing in the series. This one is called “easy implementation,” because it is just implementation of the three “out of the box” filters I wrote about in Part 2. In Part 2, I only wrote about what they do; here, I write about how to make them work for you.

So first, go to the Filter Manager, found in Analytic Settings. And to make this as easy as falling off a wet rock, here is a picture of it:

GA Filter Manager

Notice how you have to click on the white text which has a charcoal background to create a new filter (the top border), not on the blue underlined Learn More. And the next screen will be similar, you have to click on the white “Add filter,” which is on a charcoal background. Hard to see, easier after you have done it hundreds of times.

Easy Filter #1: Exclude all traffic from a domain. Remember that you are excluding traffic based on the visitor’s domain, and that domain has to be an ISP, before you start this. Here, let me be more clear: you can’t use this filter to exclude all the traffic from Google — it will only exclude the traffic from people who work at Google. Don’t remember this? Well anyway, your screen looks like this:


All you need to do is give the filter a name (and it just needs to be descriptive so that you’ll remember it). Then, use the drop down box to choose “Exclude all traffic from a domain.” Only the final part might be hard — the domain. (In fact, I would love to get email/comments from anyone who actually uses this functionality.) When you screen out a domain, and it is an isp, you are going to exclude a *lot* of traffic. Did you really want to exclude everyone from Verizon? From Microsoft?

Well, let’s say that you do. You can keep your RegEx simple, and merely type in Microsoft. Regular Expressions are greedy though, and will include and and anything else. If that’s what you want, great, and if not, make them specific: or if you are really compulsive,$. Need to understand how to use the characters that make up the Regular Expressions, like the backslash and dollar sign?

Easy Filter #2: Exclude all traffic from an IP address. This is a much more selective way of excluding traffic. You’ll do it the same way as above: First you give the filter a name that is meaningful to you, then you choose “Exclude all traffic from an IP address” from the drop-down box, and finally, you create the regular expression that defines your IP address(es). You might just have one, like this:, in which case, you’ll write it like this , thereby turning the magic dots into simple everyday dots. Or maybe, you have a range of IP addresses – you can still get them into that one box by using Regular Expressions. So if you own IP addresses through, inclusive, you’ll write ^72.77.12.(2[6-9]|3[0-9]|40). If this is complete gobbledygook to you, the way it was to me a year ago, check out this post on Regular Expressions – the same example is used there.

Easy Filter #3: Include only traffic to a subdirectory. So it’s the same drill. First you give the filter a name that means something to you, then you choose “include only traffic to a subdirectory” from the dropdown box, and finally, you create a regular expression that defines the subdirectory. For example, if I only wanted to see traffic to this blog, which is now at, I could do it a few ways, but the safest would be like this: ^/blog/

Why? The carat ensures that the directory has to start with the word blog. And because there is a slash after the word blog, the RegEx will stop working at that point — it won’t pick up another random directory calling, for instance, blogging.

And now how do I apply these easy filters? You created extra profiles, right? So use the bottom half of that Filter Manager screen and choose which profile to add the filter to. Alternatively, you can just start with a profile and create a filter for it. (But you still have to find the white text on the charcoal background to Create a Filter.)

Check your filters the next day to see if they are working correctly. If you pull in only the new day’s data, you’ll be sure that you don’t have any unfiltered data. Do they make sense? Compare them to unfiltered data over the same time period – does the difference make sense?


Our owner and CEO, Robbin Steif, started LunaMetrics twelve years ago. 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 recent Diamond Award for business leadership. You should read her letter before you decide to work with us.

  • Hi Robbin,

    Hope all is well, you can help with a quick question.

    Can the filter “Include only traffic to a subdirectory” be set up to include several directories in one profile?


  • Robbin

    Karl, are you interested in OR filters (include this subdirectory or this one) or AND filters (include only if they touched both subdirectories?) You probably mean “OR”

    Now that GA has the “new and improved” out of the box filters, I would have to test it, but I know you can do a regular expression with a custom include filter and achieve your goal.. So if your two subdirectories are /Karl and /Kleinbach, you would do Custom > Include, give it a nice name (“Include all gtraffic to either the Karl directory or the Kleinbach directory”), choose request URI and the pattern might be /karl|/kleinbach or even ^/Karl|^/Kleinbach


  • Robbin,

    Took me a bit to get back to this, glad I did though.

    I did mean “or”, thank you for your answer. I’ll give this a shot and see how it works out.


  • Megan


    Will the include only traffic to a subdirectory filter also report on the subdirectories of that subdirectory? For example, if I have a newsletter at and set up a filter for to include only traffic for the subdirectory /newsletter, will it also track the visits to other files inside that directory (besides the index file) and to subdirectories inside it (as in each issue has a separate subdirectory inside the main subdirectory, such as /newsletter/spring)? I set up a filter yesterday, and it kind of looks like it’s only tracking the index file of the main subdirectory.


    • Robbin

      Megan, the filter should work the way you want it to (i.e. tracking newsletter/spring and newsletter/spring/May) and not tracking only the index file. Maybe you should give it a few more days and then look at the data – the index page may be the most popular.

Contact Us.


24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us



We'll get back to you
in ONE business day.