Google Analytics Hacks-II (Adding Regional Search Engines)
Apart from adding additional search engines to the existing list provided by Google Analytics, you could also use this method to create more regional lists of the main players. For example, if you are based in the India., being able to differentiate google.co.in from google.com may be of importance. You might think adding the following to the GATC of your pages would provide this:
pageTracker._addOrganic(“google.co.in”,”q”);
However, this won’t work, because when adding regional variations to the search engine list, the order becomes important. Defining the custom addOrganic variable in your GATC appends google.co.in (or any other variation) to the end of the default search engine array list, but the default list is already assigning any google.*domain as “google”; therefore, appending is too late to change this. The answer is to first clear the default search engine list from the GATC and then redefine all search engines using your custom list, as shown in this example:
pageTracker._clearOrganic() // clears the default list of search engines
// Define new search domains
pageTracker._addOrganic(“google.com”,”q”);
pageTracker._addOrganic(“google.co.uk”,”q”);
pageTracker._addOrganic(“google.es”,”q”);
pageTracker._addOrganic(“google.pt”,”q”);
pageTracker._addOrganic(“google.it”,”q”);etc.
Rather than define a long list of search engines in your GATC, it is better to place these in a separate JavaScript file—named, for example, custom_se.js. Place this file in the root of your web hosting account. Then call the file in all your web pages by adding the following line to your GATC:
<script type=”text/javascript”>
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.”
: “http://www.”);
document.write(unescape(“%3Cscript src=’” + gaJsHost + “googleanalytics.
com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script src=”custom_se.js” type=”text/javascript”></script>
<script type=”text/javascript”>
var pageTracker = _gat._getTracker(“UA-12345-1”);
pageTracker._initData();
pageTracker._trackPageview();
</script>