Filters For GA, Part I: Get Ready With Profiles And Regex

April 8, 2007

I promised to write about Google Analytics (in this video). But first, I want to talk about profiles and Regular Expressions, because they will make your work so much easier.

Profiles. So you’re learning about filters, and you’ll probably make some mistakes. Join the crowd. But why make mistakes on the data that you’ve been using for a year now? Keep that “production data” holy, and experiment on a sandbox profile. Even if you think you are an expert at GA, always have at least once sandbox profile, and preferably two.

(Need to understand what profiles are? Well, certainly, you can use a profile within an account to measure a second website. But here, we aren’t talking about profiles for a new website, we’re talking about profiles for the same website. This is one of those concepts that is hard to understand at first, but is trivial once you get it. The idea is, you have multiple copies of your web analytics, all measuring the same thing, and if you set them up exactly the same, they will look exactly the same. However, you don’t have to set them up the same — you can keep one as your “good” copy, and the others can be used to learn. Need to learn how to configure a second profile?)

Having two clean (i.e. no filters) sandbox profiles will help you in a variety of ways: First, you don’t need to worry that the other filters on that profile are messing you up somehow. Second, they both start (one with and the other without the filter) at the same time, so when you write me and ask me why your filter doesn’t work, I promise I won’t ask if you chose a time period that pulled in unfiltered data. Third, since you won’t have taken yourself out of the data (because most people use filters for that, all except those who build special cookie workarounds), you can test it yourself doing all the strange things you’d like to check out.

Regular Expressions. Most filters require regular expressions. Now that I’ve gone through fourteen posts on Regular Expressions (RegEx) for Regular People (and specifically, for GA), I will be referencing that data. And if you already know it, you’ll think that this filter stuff is easy, easy.