Did you ever wonder what sites your visitors are leaving your website for? Did you get frustrated because your lower-case URL filter has no effect on your on-site search term reports? Or did you just want to find the right Regular Expression to aggregate those countless Hotmail and Yahoo Mail referrers? Here are five easy Google Analytics tune-ups I use regularly.
1. Clean up the mess in your on-site search reports by transforming search terms to lower case
On-site search reports are one of the greatest features of Google Analytics. They are one of the few reports that give you qualitative insight into your visitors (= what they were looking for). But does this look familiar to you:
Some people search for “CV”, others for “cv”, some search for the upper-case “Tomato”, others for the lower-case “tomato” (If you’re administering a German website, you know that is an even bigger problem because upper-case inital letters are abundant in German). When analyzing search term performance, you usually want to call the whole Tomato-tomato thing off and treat those two tomatoes as if they were the same.
Now where is the problem? Can’t I just use that standard Google Analytics filter that converts all my URLs to lower case? Incredibly, you can’t. First of all, search terms are not available as a filter variable. Second, search terms are processed separately and taken out of the URL before all the filters get applied. So even if you have that lower-case filter, your search terms will still show up in upper and lower case.
Let’s note that this can make sense: On a Spanish website eg., a searcher looking for “sopa” (soup) may expect something different than someone looking for “SOPA” (the Stop Online Piracy Act).
Still, in most cases, it is just a nuisance. So this is how you transform all your search terms to lower case before you send them to Google Analytics.
In your standard tracking code, there should be this line:
Replace that by
Note that this will also transform all your other URL parameters (the ones preceded by ? or &) to lower case. Usually, that doesn’t matter, but if you do not want that, you can restrict this special tracking code to your search result page and use the standard code on the other pages.
2. Automatically track all clicks on outbound links
This is a classic. Knowing how your visitors leave your website is crucial. It shows you which other websites receive traffic via your site (a great intro if you’re asking for a backlink), and if you are engaged in some sort of affiliate marketing business where you’re paid for getting other sites (usually online shops) referral traffic, it is crucial that you can see whether people are actually clicking on those links.
- Include the file at the bottom of your pages before the closing tag (or include it in a way that it doesn’t get executed before the page has loaded entirely)
- Replace “google.com” as the value for “mydomain” with your hostname
- Optional: Replace the values for ga_extlink_eventcategory, ga_extlink_eventaction and ga_extlink_eventlabel by the GA Event Categories, Actions and Labels you prefer
For the script to really track every click, it is better if your outbound links open in a new tab/window.
Note: You can of course also use this script from the Google Analytics help, just note that that one does not work automatically, you’ll still have to add the onclick Event Handler to every link AND you might run into problems if there are other click events attached to those links (that’s why my script uses Event Listeners instead of Handlers).
3. Aggregate Yahoo Mail, Hotmail and Web.de referrals
If you share a URL via e-mail with a friend that uses Yahoo Mail and that friend clicks on your link, he will arrive at your site via one of the many Yahoo servers. So searching for mail.yahoo.com in your referral report gives you hundreds of referrers which are actually one and the same:
The same goes for Windows Hotmail/Livemail (dozens of referrers called “xyz.mail.live.com”) as well as the still popular German e-mail provider web.de (I am always flabbergasted that so many people still use an e-mail service cramped with blinking ads that until recently didn’t allow for more than 10 megabytes of storage space. They have recently gone up to 500 MB, but that’s still pitiful in comparison to Gmail’s current 7,6 GB).
Of course, I am not the first one to solve this problem. As a matter of fact, I originally followed the instructions from a blog post at “100 Dollar SEO” that doesn’t seem to exist anymore (nor does the site). Analytics Cookies also has a guide on this topic, but makes it a little more complicated than necessary by using an Advanced Filter when a simpler Search-and-Replace Filter will do.
So here are screenshots of the filters in Google Analytics’ new V5 interface:
4. Automatically track e-mail links, downloads of PDFs and other documents
Depending on your site type, you’d want to have clicks on your download links tracked automatically instead of manually tagging each and every link. There are some good solutions out there, with a free one for the new asynchronous Google Analytics tracking code coming from Blastam.com (jQuery needed!).
5. Automatically track on-site campaign links
Ever wanted to know how many times people actually click on those headlines and teasers on your homepage? Check out my article and tutorial video on how to automatically track your on-site campaign links as Events with Google Analytics.
Now it’s your turn: Which are your favorite Google Analytics enhancers?