The ROI Revolution Blog

« How Often Do You Check What Is Important? | Main | How to Set Up Goals In Google Analytics »

Filtering Your Data

January 4, 2006

Control is everything when it comes to web site analytics. You want to make sure you're tracking the right data, and you need to make sure you're tracking the data right. With traffic filters, you can control exactly which data are flowing into your Google Analytics profile, and which aren't.

There are three predefined filters that you can use, right out of the box:

In addition, you can apply custom filters to any of your profiles. Use Exclude Patterns to remove hits that contain certain criteria (visitor's browser type, operating system, or even the city they're surfing in from). Include Patterns do the opposite, so be careful with them. You'll be matching only results that match your filter, and excluding everything else.

Search and Replace filters are great for converting query strings into useful Analytics data. /fiction/detail.php?id=9376 doesn't mean much to the average user, but change it to /fiction/detail/harrypotter5, and everyone's on the same page, so to speak.

Lookup Tables and Advanced filters, while more complex than the filters listed above, are also great tools for manipulating the data coming into your Analytics profile. For more information on applying the right filters to your website's Google Analytics profile, drop us a line or check out the Google Analytics Help Center.


Interested in learning more about Google Analytics?
Attend our LIVE Google Analytics Seminars for Success training in Chicago, IL Wednesday, September 16th, 2009 and Thursday, September 17th, 2009 or get the latest tips and tricks sent to you via our free, twice-monthly Google Analytics newsletter.

TrackBack

TrackBack URL for this entry:
/mt/mt-tb.cgi/21.

Comments

I've been fiddling with filters but I don't see any (immediate) changes in the reports.

So, my question is, when do the filters take effect? As data is collected? Or, as it is compiled into reports?

If the former, how do you retain comparability with history if you tweak the filters as you go along?

And, if the later, what is the refresh rate for the report generation?

- nello

Posted by: Nello Lucchesi at January 13, 2006 6:04 PM

Hey Nello. The filters are applied as the data is collected. Currently, there's no way to process historical data, but Google have hinted that the feature may be re-implemented in the future.

If you'd like for us to keep you informed over the status of this, and many other features in Google Analytics, please take a look at our email newsletter, ROI Revolution News.

Posted by: Michael Harrison at January 16, 2006 2:58 PM

I am using the Search and Replace filter to help Identify the pages in GA but I don't think it is working correctly. My site creates pages that have dynamic URL's and the URI's look like this /pagina.asp?DocID=15
So I do a search and replace filter and replace it with this /pagina/AboutUs to reconize it. The question that I have is what Filter Field selection do I use from the drop down box when using this filter?

Posted by: Philippe Ward at March 25, 2007 12:40 PM

Hey Philippe. You need to use the Request URI filter field. Also, be sure to escape out certain characters like the period (.) and the question mark (?) with a backslash (\). This will ensure that the regex operates properly.

Posted by: Michael Harrison at March 26, 2007 8:39 AM

Michael,
I have done this and it doesn't seem to be working. Here is what I set up

Filter Type = Search and Replace

Filter Field = Request URI

Search String = /pagina.asp?DocID=17

Replace String = /pagina/DebtConsolidationPage

Case Sensitive = No

Does this look correct to you?

Thanks,
Philippe

Posted by: Philippe Ward at March 27, 2007 3:00 PM

Philippe, it's really important that you escape out the period and the question mark with a backslash. Your search string should be /pagina\.asp\?DocID=17

The search strings can utilize regular expressions. For more info on regex, check out Regular-Expressions.info.

Posted by: Michael Harrison at March 27, 2007 4:27 PM

Hi guys,

I've been trying to clean up my analytics data and just wanted to confirm that any query parameters you exclude in your settings will only affect future data, and will not exclude the query parameters in URL's of past data; is that right?

So for example I have this URL:

/site/training-class2.php?st=Completed&amt=799.00&cc=USD&cm=&item_number=2583&sig=qLO8+m+rzF70wNGQzqUvBz//iHdywPLZLmjSC

Every time someone signs up for our training, they land on this unique confirmation URL which is essentially the same page. So I am seeing many of these but they are the same page and I want to combine data for all of them into one recognizable URL; GA sees them as different pages because they pass unique info in the query parameters.

So if I set up my profile to exclude all of those query parameters, would I still all of those unique URL's when looking at past data, and anything from this point forward would be combined into one?

Would a ^/site/training-class2.php search and replace filter work on past data so that I could rename all of those URL's as one? I wonder if that would work on past data as well.......

Jesse

Posted by: Jesse DaCosta at June 2, 2008 10:54 AM

When using the filter to only track traffic to a subdirectory, I run into a problem. For example if I set up a filter to only track visits to www.regulardomain.com/directory, and then I set up a vanity URL to direct traffic to that directory, for some reason that traffic is not captured in the profile with that filter. Am I doing anything wrong?

Posted by: Aaron at September 8, 2008 3:30 PM

@Aaron: That's very odd. You should see pageviews for /directory in your Google Analytics content reports. Can you see these pageviews in your non-filtered profile? If so, try taking the regular expression you're using for the include filter and applying it to the Top Content report search box. If it's not displaying your subdirectory, then the expression is not correct.

Posted by: Michael Harrison, Google Analytics Support Tech Author Profile Page at September 8, 2008 4:02 PM

Post Your Comments

Feedback Form