Google Analytics recognises 41 search engines by default. Although this is constantly being added to, there are of course a great many other search engines in the world – language and region specific, as well as price comparison and vertical portals.
This hack is for anyone who manages SEO at a regional level i.e to be able to differentiate regional variations of search engines. For example, the default Search Engine list for Google Analytics shows aggregate search engines – Google, Yahoo, MSN etc., this hack shows regional specific ones for your SEO efforts.
April 2011 – New async hack launched
This hack has been completely revised for the latest GA async code. Further info >>
[ Now 100+ additional SEs + GA defaults (140+ domains). You no longer need to re-define the default set of search engines as this hack now prepends new search engines to GA’s list. For details on new prepend revision see: code.google.com ]
Sample list of regional search engines:
- maps.google.com (local search)
It is straight forward to add to Google’s list of recognised search engines – you simply add your own as described in the following Help Centre article . However, the Help Centre article cannot customise the list – only add new search engines. That is, “google” as a whole has already been defined so adding google.co.uk to the list won’t work as – it’s too late.
This hack was written to enable you to do this (original 2007 post here ).
Some further background…
I discuss this hack in Chapter 9 of the book and show the script to do this. However recent changes in the Google Analytics Tracking Code (GATC) has meant that the code no longer works written as it was.
Fortunately after some experimenting (a pseudonym for trial and error!), and help from Tomas Remortigue from Mountain View (all round nice guy and Google Analytics technical wiz), the hack is now fixed and back working 🙂
How to track regional search engines
From the book, this is a simple update with respect to the placement of code – the call to the custom_se-ga.js . You can host the script locally (get the file from my scripts directory and place it in
/scripts on your web server), or simply link directly to my file as shown.
Schematically, change your standard GATC from:
Notice the line inserted between setting the GA account number and tracking the pageview.
So a full GATC will look as below (remember to replace the account number, beginning with “UA-” with your own):
Note: The syntax of the GATC has to be exact for this to work. When in place, your Traffic Sources > Search Engine report will look something like the one below:
If you use this hack, I would be interested to hear want you think, so please add your comments below or provide a rating by clicking the stars.