You can achieve some great results in profile filters using advanced filters, but you need to be extremely careful as once you change these filters the change is irreversible for historical data. I strongly advise you create a duplicate profile for testing purposes and going nuts on your profile filters! I’m going to share a few ideas and show you how I’ve used advanced filters in the past.
An advanced filter lets you take information from up to 2 existing fields in google analytics to construct 1 field that contains elements from these two fields and anything you might like to add.
You can use advanced filters to track your seo rankings, find out full referring urls, and much more! My example is renaming fields within existing strings. I do this for ease of reporting on content reports in the global profile, which reports all of our different language publications together. I take ‘ecoles’, ‘sprachreisen’, ‘strani’ etc, and replace them with ‘schools’. In this way, I can easily look at our ‘schools’ section site wide across all publications.
Lets say I have the following 2
The regex I need to identify the value I want to change is as follows:
Field A, Request URI: ^/(ecoles|strani)/(.*)
I wouldn’t normally use brackets around my wildcard dot star above, but in the case of advanced filters it is required. Every set of brackets corresponds to something I can re-use in my output field. The logic is as follows: To reference the contents of brackets in the output field, you prefix with a $, Follow with the field name, so either A or B, then the sequential number of the set of brackets.
So, if the above regex was in field A:
$A1 = (ecoles|strani)
You need to use these $ codes to construct the output back into the reporting,
In my case this would be as follows:
Output to, Request URI: /courses/$A2
What the filter is telling GA to do is take the existing Request URIs, match only what matches the specified RegEx and split the string into these groups (with the brackets). Then put it back into my reports making these changes (constructed from the output field).
for advanced filtering…
If you have a particular problem you can always ask here, I get great pleasure from puzzling over tricky RegEx advanced filters!