How-To Public

Renaming Pages Using Advanced Filters (Google Analytics)


Hobsons Radius (Radius) is the CRM used by the Office of Graduate Admissions to implement the graduate online application and the “Request Information” (inquiry) form. We have implemented Google Analytics on pages within Radius, so usage data for features like the online application and the inquiry form are being tracked.

The Problem

Unfortunately, however, the page URLs used by Radius are not readily identifiable without a ‘cheat-sheet’ of some sort. Furthermore, HTML page titles in Radius, which are also available in Google Analytics, are all the same and cannot be used to determine the page the user accessed.

For example, take a look at the following Radius URLs, and their associated URLs and HTML page titles:

Radius Feature Page URL HTML Page Title
Spring 2018 Online Application (Degree-Seeking) George Mason University Graduate Admissions
Fall 2018 Online Application (Degree-Seeking) George Mason University Graduate Admissions
Inquiry Form George Mason University Graduate Admissions

Note that:

  • It is not easy to identify particular features by URL. A Google Analytics user would need to reference another source to match URLs to Radius features.
  • The HTML page titles are all the same, so the page title cannot be used to determine which URL represents which feature.

Here is how those appear in GA reports (having added page title as a secondary dimension):

The Solution

I modified the Google Analytics implementation for the Hobsons Radius CRM in order to allow Google Analytics users to more easily identify pages in Google Analytics reports by adding descriptions to the page title field.

Specifically, I created three custom view filter on the relevant GA view(s). Each one is responsible for detecting a particular page (URL) and re-writing the Page Title field to make it clear what the page represents.

Here are the three view filters in question:

Here is a detail of one of the above filters:

Since some information is not visible in the screen shot:

  • The full view filter name is: “Label: Page Title: Graduate Online Application – Fall 2018 – Degree-Seeking” (This name is arbitrary. It could be anything. Just make it clear.)
  • The full “Extract A” field is: “(/ssc/aform/KI7l0nzN686G0x670wA71\.ssc.*)”

What does this filter do:

  • First, this filter only matches with pages that contains the string “/ssc/aform/KI7l0nzN686G0x670wA71.ssc” in the “Request URI” field. That catches precisely one page: the Fall 2018 graduate application. Note that in the regex used in this field, the dot character (.) is escaped with a backslash (\.) to indicate to GA that we want to match a literal dot character, and not to interpret the dot character as a regex metacharacter. Furthermore, note that I included a dot-star (.*) at the end of the regex to make sure it would catch any URLS with parameters after the page path.
  • Second, this filter then goes on to capture any and all characters in the “Page Title” field, storing them in a capture group for later use. By using a dot-star (.*) for the Extract B field, and wrapping it in parenthesis, it will capture the entire field value, and store it as the capture group $B1.
  • Finally, the Output Constructor field modifies the “Page Title” field to include the original value (referred to using the capture group $B1) appended with a description of what this page URL represents.

In this way, we can make the page titles more clear in Google Analytics reports.

After applying these filters, here is how the data look in GA reports (after applying Page Title as a secondary dimension):

It is now much easier for Google Analytics users to identify what pages they are looking at.

Final Thoughts

You could use this filter to re-write any field. I initially thought to re-write the “Page” field, so that the revised info was available without adding a secondary dimension, or changing the primary dimension, but decided to leave the “Page” field as it is, since it represents the actual URL for the page that was viewed (and modifying it would have prevented the ‘visit URL’ button from working anymore.

I also thought of using a custom dimension to capture the associated information, but there would have been more overhead in terms of the initial custom dimension setup, and a training issue when it comes to making users aware that this field was available.

Ultimately, I decided to modify the “Page Title” field, since it is a standard field, is relatively accessible/discoverable by users, and since it only contained redundant, useless information by default.

This is also a good time to point out that Google Analytics refers to the field that we might call the page address or the page URL in different ways depending on context. In the Google Analytics Reporting Interface, the field is called “Page”. In the view filter setup screen, the field is called “Request URI”. (The data shown in this field is not technically a URL, because a URL must begin with a protocol.)