Google Analytics Regular Expressions Cheat Sheet

Analytics supports regular expressions so you can create more flexible definitions for things like view filters, goals, segments, audiences, content groups, and channel groupings. In the context of Analytics, regular expressions are specific sequences of characters that broadly or narrowly match patterns in your Analytics data.

For example, if you wanted to create a view filter to exclude site data generated by your own employees, you could use a regular expression to exclude any data from the entire range of IP addresses that serve your employees. Let’s say those IP addresses range from 198.51.100.1 – 198.51.100.25. Rather than enter 25 different IP addresses, you could create a regular expression like 198\.51\.100\.\d* that matches the entire range of addresses.

Or if you wanted to create a view filter that included only campaign data from two different cities, you could create a regular expression like San Francisco|New York (San Francisco or New York).

Check cheat sheet created by Jay Taylor, listing the most used regular expressions supported by Google Analytics.

jay-taylor_google-analytics-regular-expressions

Download file here

source: https://www.cheatography.comhttps://support.google.com/analytics

READ ALSO:  Checkpoint CLI reference card v2.0.1