a nA lytiCs
j Ust a story about Regular People and Regular Expressions . . . Google Analytics is one of the most widely used tools to measure and evaluate websites. The GA team has worked hard to make it easier and more intuitive than ever before. However, you may still feel that you are limited by the Google Analytics out-of-thebox functionality. If so, it’s time for you to learn about Regular Expressions and how GA uses them.
When I first starting working with Google Analytics, I was an analyst. A marketing person. Not a techie. Back then, the Google Analytics documentation kept referencing something called Regular Expressions. I could see that my goals and filters weren’t doing what they needed to do, but, not beinga techie, I didn’t know how to implement RegEx and fix them. (In fact, I knew so little about this space that when a friend referred to Regular Expressions as “RegEx,” I wondered what he was talking about.) Slowly I taught them to myself, with the help of Wikipedia and a friend in Australia. Then I began to blog about them, using non-techie language. I got a letter from a trainer on the other sideof the pond who told me that when he trained people in Regular Expressions, he turned them loose on the LunaMetrics blog. Eventually, Google invited my company to become a Google Analytics Certified Partner. Our company helped rewrite the Google Analytics Help Center section on Regular Expressions. And to this day, I get random emails from random people, asking me to troubleshoot their RegEx.2
wH y u se r eg Ex
In Google Analytics, you can use Regular Expressions to ...
A word about language.
What would a how-to guide be without some dictionary-type advice? Here are some of the conventions we may use: GA: The abbreviation for Google Analytics RegEx: the abbreviation for Regular Expressions (singular and plural) Plain text: Not Regular Expression Text String: any assemblyof characters and/or spaces. A word could be a string, a sentence could be a string, a URL could be a string. Target String: the string you are attempting to match with your RegEx. Example: when I use robb?(y|i)n to match my name, Robbin (the one with all the funny characters), robb?(y|i)n is the Regex, and my name, Robbin, is a target string.
create filters. fine-tune
Many filters requireRegular Expressions. If you don’t know what filters are, you can start learning about them here. that matches multiple goal pages. Perhaps your “thank you” page has many names, but to you, all leads are the same goal. So you can use Regular Expressions to “roll them up.”
create one goal
your funnel steps so that you can get exactly what you need. Remember, Regular Expressions can bespecific. What are Regular Expressions, anyway? Regular Expressions are about “power matching.” If you need to create a goal that matches multiple thank-you pages – that is power matching. If you need to write a filter that matches multiple URLs, but only know what a piece of each URL looks like – again, that is power matching.
But what about Advanced Segments? Can’t I skip this whole RegEx thing nowthat Google Analytics has Advanced Segments? Well, no. Advanced Segments are lovely, and they often make filters unnecessary. But they don’t work the same way as filters do. And you will still need Regular Expressions to create interesting and complicated goals, and to accommodate your website designer who doesn’t do things the Google Analytics-friendly way. And sometimes, you will want to useRegular Expressions in your Advanced Segments.
A word about format.
I just hate when I read a post or book and they write that the keyword is “sodapop.” Or “vanilla.” Or anything that has quotation marks around it. Because you never know if the quotation marks are part of the stuff you are working on, or are just used to separate that word from the rest of the sentence. Consequently, I put all...