
- Image via CrunchBase
The topics I have been struggling with most in my Google Analytics Individual Certification exam was regular expressions or Regex, because honestly I had never used them in my work with GA, ever. The exam forced me to beef up my knowledge (which is still pretty shaky), but now I keep on discovering new uses or Regex every day.
One of the simplest applications or RegEx in Google Analytics is the Filter that GA displays are the bottom of every list.

- Google Analytics Filter Box
Usually you would just enter a keyword to narrow down the items in the list. Google gives your two standard options “containing” and “not containing”. Pretty limited, huh? Regular expressions allow you to significantly boost the power of this filter.
Say I want to check how many of my visitors come to my little blog using vendor name of WA tool as keywords, say “Omniture“, “Webtrends” and “Google”. Using the RegEx “Or” operator “|” (not capital I, but |), the query looks this “Omniture|Webtrends|Google”.

- Show all list items that contain either “Omniture” or “Webtrends” or “Google”
Pretty cool, right? This is especially helpful in the Keywords report, for example to catch various spellings of a brands term, bout works just as well in any other report that allows you to filter. Most popular pages? Sure. Length of Visit? Sadly, no.
You can also find queries that start with a specific term (e.g. “^Omniture”) and end with a specific (e.g. “Omniture$”) term using RegEx.

- ^Omniture: Show all list item that start with “Omniture”

- Omniture$: Show all list items that end with Omniture
And last but not least, remember that Google Analytics’ filters are greedy. The “containing” filter will show you any list item that contains the search term (Broad match), which can be pretty annoying at times. So always remember your RegEx when you want the exact matches. Combining the “begins with” and “ends with” expressions from above, the exact match for my “Omniture” search term looks like this: “^Omniture$”

Good luck playing around with this.
For more information on RegEx (well at least a little more) you can go to the Google Analytics’ Help section posts What are regular expressions?. Or get a deep dive at this great resource on the Lunametrics blog. Thanks Robin for putting this together.
Any questions or comments? Please let me know in the comments or by email.
Best,
Florian
Related articles by Zemanta
- Florian just passed the Google Analytics Individual Certification (longmarch.chinalytics.com)
- Regular Expressions, Your Job Requires Them – Tim Barcz – Devlicio.us (tomaltman.com)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=942e16d3-5521-48e9-8eca-5e6c05ab0f9b)

0 Responses to “Google Analytics Quick Productivity Tips #1: Use Regex to filter lists”
Leave a Reply