You can use Regex in many places in Google Analytics. This article will give you some great ideas of places to practice your REGEX coding skills.
1: Report filters.
Your top content report, referrers report, keywords report, map overlay and many others have
a filter option. If you’re still using the old version of GA this is at the bottom of your report, in the new version on the top right. This is the simplest place to get started with regular expressions. I often use this filter panel to test my RegEx before creating something more substantial like an advanced segment.
2: Advanced Segments.
Advanced Segments let you create filters that you can apply to your reports again and again, rather than creating a filter each time. You can also run the segment against any report in GA, and you can compare up to 4 segments against total in a given report! The predefined segments are great, but it won’t be long before you’re asking questions these segments can’t answer. That’s when you need to bust out the RegEx! I use this to report affiliates as opposed to referrals, and to segment the different types of social activities we are engaged in.
3: Multi Channel Funnels.
Similar to advanced segments, you can create custom segments in the new multi channel funnels reports in GA. If you’re not familiar with this report yet, check out the video here.
Extremely useful if you have multiple goals you want to track. In my case I use RegEx to report one goal for contact form submissions in 22 different languages across my website. That’s a lot easier than it might sound, the building blocks are simple and it’s just a question of constructing you regex patiently!
5: Profile filters.
You can do so much in here. I have created profiles for all the different geo-segments we’re interested in, we have a profile for each of our publications, and I even translate all our schools and courses in the global profile to make it easy to report across the board. That one uses advanced filters and deserves a post to itself.
A word of caution, if you make a mistake in a profile filter you can’t undo it retrospectively. I have a two tier approach to avoiding disaster. It’s best practice to have a master unfiltered profile. Secondly, I have a special ‘Phil’s Laboratory’ profile where I make all my mistakes first before applying any changes to profiles others in the business are using.
Has anyone got any other tips on where to use RegEx in Google Analytics?
Links to the rest of the series: 2: Pipe
RegEx 1: Introduction
RegEx 3: Brackets
RegEx 4: Question Mark
RegEx 5: Backslash
RegEx 6: Plus Sign
RegEx 7: Dot
RegEx 8: Star
RegEx 9: Dot Star
RegEx 10: Caret
RegEx 11: Dollar Sign
RegEx 12: Square Brackets
RegEx 13: 5 Great Places to use RegEx – You are here!