Upcoming LunaMetrics Seminars
San Francisco, Mar 2-6 Chicago, Mar 9-13 New York City, Mar 23-27 Boston, Apr 6-10

Regular Expressions for Google Analytics: OK, I did it

regular-expressionsI was finally inspired by Alan, who reads this blog using his Blackberry on the Paris Metro. (Truly a world wide web.) Also inspiring were the comments of an anonymous poster, who wrote that all the Regular Expressions (RegEx) posts were incredibly helpful, but couldn’t I please make them easier to access? So I did it, they are all beautifully threaded now. I even fixed awful typos in the Summary/Intro post and the ^ post (and you know, typos are the worst when you are a newbie learning a technical topic, you can spend hours trying to understand a topic, only to finally learn that the author was just lazy.)

Backslashes \
Dots .
Carats ^
Dollars signs $
Question marks ?
Pipes |
Parentheses ()
Square brackets []and dashes -
Plus signs +
Stars *
Regular Expressions for Google Analytics: Now let’s Practice
Bad Greed
RegEx and Good Greed
Intro to RegEx
Minimal Matching


Robbin Steif

About Robbin Steif

Our owner and CEO, Robbin Steif, started LunaMetrics ten years ago. 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 recent winner of a BusinessWomen First award, as well as a Diamond Award for business leadership.


7 Responses to “Regular Expressions for Google Analytics: OK, I did it”

Anonymous says:

Thank you!!!! Your anonymous reader!

Anonymous says:

Hey, I’ve got a question, I finished your tutorial, and then set up an advanced filter in GA, and I’m not getting the results i expected.

Here’s what I’ve got:

Field A : Request URI : (Donate|Ecommerce|EcommerceCheckout)/(\d+)(.*)

Field B nothing

Output to: request URI: $A1$A3

Override output field, ok.

But I’m still not removing a string of numbers from my urls. Help!

Send me email, to my last name at lunametrics.com (Actually, I would be happy to have you be anonymous, I just need to ask you more questions to understand better.)


[…] everything you could possibly want to know about regular expressions in Google Analytics on this LunaMetrics blog post. Posted in […]

[…] been very helpful in achieving the desired results. Lunametrics provides a comprehensive guide on Using Regular Expressions in Google Analytics. Rate this: 3.2 Make a […]

[…] They just made no sense for me. The best resources for me were the LunaMetrics blog with their RegEX series (old but good stuff) and a RegEX tool (or this one) for trying things out on the […]

hello!,I like your writing very much! proportion we keep up a correspondence more approximately your post on AOL? I require a specialist in this house to resolve my problem. May be that is you! Looking forward to look you.