Mistakes with Include Filters | LunaMetrics

Mistakes with Include Filters

/

There is one particular mistake I see over and over with regard to setting up filters in Google Analytics.  This has been talked about before, but it comes up so often that I don’t feel bad about addressing it again (and again, and again).

The Mistake

Multiple Include Filters, causing no data to get into the profile.

What it looks like

1. Include – Request URI – /page.html

2. Include – Request URI – /other.html

What is intended?

The person that adds these 2 filters to a profile wants to include both /page.html AND /other.html.

But why doesn’t that work?

The Technical:

When GA processes filters it does so, sequentially, one at a time.  Filters are like a series of gates, in-line, along a road. In order for data to get from point A to point B, it has to pass through each gate in turn. If there is any one gate that it can’t get past, then no point B and it doesn’t end

Create New Filter - Google Analytics

up in the profile.

Each Include filter can be thought of as an “Include Only” filter.  Let’s look at the 2 example Include filters above with that wording in mind, and see how far our data makes gets.

Data –> A) /page.html, B) /other.html, C) /index.html

1. Include – Request URI – /page.html
2. Include – Request URI – /other.html

The first thing that happens is our data is checked against Filter 1.

Filter 1 says “Include ONLY data that has a Request URI that matches /page.html”
Data A matches /page.html
Data B does not match /page.html
Data C does not match /page.html

Now we have
Data –> B) /other.html, C) /index.html   -> didn’t make it past the filter
1. Include – Request URI – /page.html
Data –> A) /page.html
2. Include – Request URI – /other.html

The only piece of data that made it past Filter 1 was Data A, /page.html

Now it is tested against Filter 2, which says “Include ONLY data that has a Request URI that matches /other.html”

/page.html, is tested against Filter 2, /other.html.  It does not match, and ends its trip short.

So, no data in our set can possibly make it past both filters, since there is no single page that can match BOTH /page.html AND /other.html

Just above the enter key

The Solution

The solution is to use a single filter that looks like this:

1. Include – Request URI – /page.html|/other.html

We put both pages that we want to include into a single filter and seperated them with a pipe.  The pipe is the vertical bar symbol usually located just above the Enter key.  This is a Regular Expression (RegEx) symbol that can be read as “Or”.  So the filter says Include ONLY pages that match either /page.html OR /other.html.

John is a former LunaMetrician and contributor to our blog.

  • http://www.shycon.com Denver Web Design

    Ah great tip, I was wondering why this was happening.

  • http://andrescholten.nl André Scholten

    I know you know, but I don’t if all your readers know: if you use the regular expression option you need this version:
    “/(page.html|other.html)”

    Your filter says: allow “/page5html”, “theother.html”, “justanother@html”, etc. That’s because the dot stands for “any character” and the slash doesn’t have to be in front of “other”. In my filter I escape the dot and I make sure there’s a slash before “other” 😉

  • http://www.lunametrics.com John

    Thanks Andre,

    I originally had the . in there, but I actually took it out, since I just wanted to keep it simpler. Since the . will still match a dot, and the likely hood of there being pages intentionally named /page5html is pretty small.

    The missing slash before other.html, however, is definitely a typo.

    Basically just trying to keep the regex to a minimum to avoid distractions. Maybe it is a bad choice, don’t know.

  • http://mlearning.stou.ac.th/read_blog/18/do-you-really-need-eyeglasses-within-an-hour

    I seemed to be looking at many old Japan Yu-Gi-Oh cards and
    i also discovered a couple of publicize cards that came out in
    1998 which includes clips from your first Yu-Gi-Oh indicate (what some phone
    season 0) and i also read that they can were unveiled by company identified as Amada (not the
    ones that had been released by means of Bandai) I became wondering in case these cards tend to be legit or fake?

Contact Us.

LunaMetrics

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

Follow Us

1.877.220.LUNA

1.412.381.5500

getinfo@lunametrics.com

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