Filters for GA, Part 3b: Custom Implementation


Lots of people subscribed to this blog last week. (Twelve. About 2.5 of all subscribers came in the last seven days.) So if you are interested in conversion or other analytics, please forgive — you just happened to land in the middle of a series about filters for Google Analytics. I really wanted to do this series; I think we need better GA documentation.

So, custom filters. As explained in Part 2b, What have we here?, there are many different kinds of custom filters. You will use them a lot, because the “out of the box” filters won’t do much. And don’t be afraid of them — just set up a new profile every time you want to try a fancy filter, and apply your filter to that profile only — that way, you can mess it up all you want.

With custom filters, you decide what to name your filter, what kind of filter to use, and what the regular expression will be that will match — just like with Out of the Box filters. But now, you have an additional decision to make: which field you are going to filter. (“Filter field.”) So here’s an example of an include filter that I would use to include just an IP address (this would be very helpful if I wanted to be sure that ONLY my data were included in a profile, then I could see how well the analytics track what I do.) My Filter Field is “Include a visitor IP address” — that’s the additional decision you are required to make with Custom Filters.

include filter

In the next post, I will go through many of the filter fields. First, let me point out that you can get this information from the Google Help, it is just not always as helpful as I want it to be. Also, if I went through them all, you will be really bored, so I will just choose a few important ones. Today, we will have just one: Request URI.

Request URI: This is the one you will choose when you want to filter by the page or section of your site that the user requested. It is a relative address; in other words, you don’t have to include the part of your URI. If your site is, and you want to exclude people who visited your blog, you would do a custom exclude filter and match to ^/blog. Remember that Regular Expressions are greedy, so they will match to everything that starts with (and maybe that is what you want.) On the Google page I referenced above, they make it sound like you can only filter by a specific page (This is incorrect, you can filter by a whole section or string in the URI.) Also, they don’t tell you that you should be using RegEx, although I had a hard time coming up with an example where you could really hurt yourself badly here.

More coming soon. Many thanks to Mike Keyes, Avinash Kaushik, Stephane Hamel, Kevin Hillstrom, and of course, the manager of the LunaMetrics Australian office, Steve, for updating their links to this blog.


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.

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