I was teaching a class on Google Analytics last week. The audience was non-technical and the session focused on how to effectively use GA reports and the most efficient way to communicate data to clients. While browsing the Content Optimization reports one of the antendees made a great observation. She commented that viewing ‘hits’ based on page name is not very useful, especially for dynamic sites that use many query string variables to drive content. A fantastic observation! Is this Content Summary report easy to interprit?
Right now you’re probably thinking, well, just use the Page Titles reports. That’s a great idea, but there are so many reports in GA that use the page name and query string variables to show page hits. I started to think, is there some way to force Google Analytics to use the page title in all the content reports?
The answer is yes. We can create a filter that modifes how the page names appear in all GA reports. To do this we apply an advanced filter to the profile. The goal is to replace the page name (such as index.asp?PageAction=VIEWCATS&id=234) with something that is more readable, like the page title (i.e. Product Category: Cameras).
Here are the filter settings:
|Filter Name:||Replace Page Names with Titles|
|Filter Type:||Custom Filter||Advanced|
|Field A -> Extract A:||Page Title||(.*)|
|Field B -> Extract B:||–||–|
|Output To -> Constructor||Request URI||$A1|
|Filed A Required:||Yes|
|Field B Required:||No|
|Override Output Field:||Yes|
Just apply this filter to your profile. There are some drawbacks to this approach.
- If the page titles are not set up correctly on the website then this configuration will not work. Multiple pages with the same title will alter the data.
- If you generate ‘virtual’ page hits using urchinTracker() I don’t think this approach will work.
- This filter will break the site overlay report. If you need to use site overlay then it is best to implement this filter on a duplicate profile.
In general, this filter seems to be stable. I have noticed some discrepency in the number of total hits, but it has been low (approximately a 10% descrepency in the data). As usual, I reccomend creating a test profile to observe how the reports change based on this filter. If all goes well then you can add the filter to your production profile.