Regular Expressions Anywhere in Google Analytics
By johnc on Nov 16, 2007
So this is just a quick tip that may have been obvious to everyone but wasn't to me and I found it incredibly useful. In Google Analytics, you can use regular expressions in any search field. So if let's say you have an ecommerce site that dynamically forms URLs like this:
you can go to Top Content and enter a regular expression like this in the search box:
Then if you wanted to see all orders for more categories you just replace type=book with something like type=(book|cd|dvd).
Of course, if the site had been thinking about analysis from the beginning, they would have formatted that URL to put type=book before the id, so that you could just search for the most static parts of the URL (thanks.php?from=order;type=book) and not have to use a regex in the search.
So all you webmasters out there, do the analysts a favor! When you formulate your dynamic URLs, the parts that are the most dynamic should go at the end. So if your information looks like this:
Orders Category Subcategory Individual ID
That's the order they should go in in the URL. Makes it much much easier to generate reports.
Another thing I'm figuring out is that I'm going to have to learn regular expressions better. People on the lists are pretty helpful but I think I need to just bite the bullet. Anybody got any advice on a good crash course (preferably online and free) to regex?