Inspired? No home

How to track traffic from lesser known search engines with Google Analytics

Google Analytics will track traffic from search engines including which specific keywords the visitor searched for. Google handles most well known search engines but by default Google Analytics does not handle the two local search engines here in Norway, Kvasir and Sesam. It is quite easy to “hack” the GA javascript code so it will track them:
<pre>
_uacct = “UA-XXXXXX-X”;
_uOsr.push(“kvasir”); _uOkw.push(“searchExpr”);
_uOsr.push(“sesam”); _uOkw.push(“q”);
urchinTracker();
</pre>

Basically all you need to add is line #2 and #3. The first and the last line you will already have included in your pages.

GA has two arrays which it uses for tracking search engines: _uOsr which holds the search engine domain name and _uOkw which holds the search keyword in the querystring. So by adding a new entry in the array you can add local or lesser known search engines so you can track these in Google Analytics.

By default GA tracks the following search engines:

<pre>
_uOsr[0]=”google”; _uOkw[0]=”q”;
_uOsr[1]=”yahoo”; _uOkw[1]=”p”;
_uOsr[2]=”msn”; _uOkw[2]=”q”;
_uOsr[3]=”aol”; _uOkw[3]=”query”;
_uOsr[4]=”aol”; _uOkw[4]=”encquery”;
_uOsr[5]=”lycos”; _uOkw[5]=”query”;
_uOsr[6]=”ask”; _uOkw[6]=”q”;
_uOsr[7]=”altavista”; _uOkw[7]=”q”;
_uOsr[8]=”netscape”; _uOkw[8]=”query”;
_uOsr[9]=”cnn”; _uOkw[9]=”query”;
_uOsr[10]=”looksmart”; _uOkw[10]=”qt”;
_uOsr[11]=”about”; _uOkw[11]=”terms”;
_uOsr[12]=”mamma”; _uOkw[12]=”query”;
_uOsr[13]=”alltheweb”; _uOkw[13]=”q”;
_uOsr[14]=”gigablast”; _uOkw[14]=”q”;
_uOsr[15]=”voila”; _uOkw[15]=”rdata”;
_uOsr[16]=”virgilio”; _uOkw[16]=”qs”;
_uOsr[17]=”live”; _uOkw[17]=”q”;
_uOsr[18]=”baidu”; _uOkw[18]=”wd”;
_uOsr[19]=”alice”; _uOkw[19]=”qs”;
_uOsr[20]=”yandex”; _uOkw[20]=”text”;
_uOsr[21]=”najdi”; _uOkw[21]=”q”;
_uOsr[22]=”aol”; _uOkw[22]=”q”;
_uOsr[23]=”club-internet”; _uOkw[23]=”q”;
_uOsr[24]=”mama”; _uOkw[24]=”query”;
_uOsr[25]=”seznam”; _uOkw[25]=”q”;
_uOsr[26]=”search”; _uOkw[26]=”q”;
_uOsr[27]=”szukaj”; _uOkw[27]=”szukaj”;
_uOsr[28]=”szukaj”; _uOkw[28]=”qt”;
_uOsr[29]=”netsprint”; _uOkw[29]=”q”;
_uOsr[30]=”google.interia”; _uOkw[30]=”q”;
_uOsr[31]=”szukacz”; _uOkw[31]=”q”;
_uOsr[32]=”yam”; _uOkw[32]=”k”;
_uOsr[33]=”pchome”; _uOkw[33]=”q”;
</pre>

See the javascript here.

Technorati:

Written on 12 October 2007.
blog comments powered by Disqus