SEO Tracking – Bing in Google Analytics (and other custom search engines)

As you may have heard, is the new search engine from Microsoft. Although tracking visitors in Google Analytics will take place automatically, the caveat is, that at present it is reported as a standard referrer – as if a link from another website. That means it is not grouped with other search engines in your reports and no keyword information is available.

This update allows you to track as a search engine in Google Analytics with visitor keyword detail.

April 2011 – New async hack launched
This hack has been completely revised for the latest GA async code. Further info >>



Search still has a long way to go in helping people efficiently find information other than for product search, so reading the Bing press release certainly caught my attention. Also see my latest post tracking regional search engines.

Although Google will no doubt apply a fix in the near future, the “Tracking regional search engines” hack is a script that allows you to define your own specific list of search engines for Google Analytics. For example, by default, Google Analytics groups all Google organic searches a ‘google / organic’. But what if you wish to separate versus versus and all the other country specific domains? This hack enables this and allows you to define other regional specific engines such as (Korea), (Sweden) etc. In fact, over 100 regional specific search engines are now included, and you can easily add your own (or ask me to add them here!).

The Bing hack for Google Analytics

Using the script is straight forward – simply call it in your GATC before the function call _trackPageview(). For example, a modified GATC is as follows:



Don’t forget to change to your account number (UA-123456-1). If you are using the legacy urchin.js GATC, refer to the corresponding script in the Hacks section of this site (Hack #2).

Your Traffic Sources > Search Engines report will then look something like this: correctly reported as a search engine in Google Analytics

As always I appreciate your comments/feedback, or a quick rating by clicking on the stars.

Looking for a keynote speaker, or wish to hire Brian…?

If you are an organisation wishing to hire me and my team, please view the Contact page. I am based in Sweden and advise organisations in Europe as well as North America.

You May Also Like…


  1. SeoProfy

    thanks a lot for the tip, already used it on my server, google analytics is the second tool i use to analize, and this post was usefull for me

  2. BClifton

    Jen: Yes, hosting the script (any script) locally is the best way to implement. It gives you more control and allows you to troubleshoot easier. See also comments #2/3

    Good luck.

  3. Jen

    Ok, thanks Brian; I have to be honest I got a programmer in to clean up all my code.

    He also advised me to host the custom_se-ga.js file under our own domain.

    Despite not knowing so much code I manage to find my way with the help of your book and these posts.

    Speaking of your book: on the next cover maybe try making the word “Google” stand out more. I had missed it the first time, even though it was exactly what I was looking for.

  4. BClifton

    Jen: As with all my “Hacks”, the order of the code is important. So you need to place the call to custom_se-ga.js in the same place I have it.

  5. SEM Expert

    Great post, thank you! I think soon GA will become a number 1 web-analytics tool in the internet

  6. Jen

    Great stuff, thanks for posting this.
    Question (as a newbie): will it also work if I put the code before the UA number, like this:
    (as there is no other /script to put it behind)
    var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
    document.write(unescape(“%3Cscript src='” + gaJsHost + “’ type=’text/javascript’%3E%3C/script%3E”));

    try {
    var pageTracker = _gat._getTracker(“UA-9586547-1”);
    } catch(err) {}

  7. web design company

    Hey good post. thanks for sharing and giving idess. till now i was not getting any traffic and i was on top for almost keyword starting with custom. i though what happend no body is using bing or what…

    anyway thanks again.

  8. BClifton

    Russell: No problem at all – I am glad that you highlight this

    Pedro: Thanks for the YouTube link – if you believe the hype Bing certainly worth a look…

  9. Robert K

    Thanks for this article – I’m not sure whether or not bing will take off like google – might be interesting to see though. Getting tracking stats from bing is very nice though. Thanks for the article and the script.

  10. Russell Smith

    Oh, okay! You’ll have to excuse me, jumping into this topic a bit prematurely as i haven’t read the previous posts. Great, thanks for following up!

  11. BClifton

    Russell: Yes feel free to download and host locally. The original posts on this script recommend that, as does the book (I am also banking on all webmasters wishing to do that anyhow). I use the call direct here to simplify the description. Thanks for the feedback.

  12. Russell Smith

    Great post, however doing so would create a dependence on your server, right? The other obviously being Google called to serve the initial ga.js? Depending on the adaption rate, this could have a pretty significant toll on your site’s bandwidth, in turn affecting all the adopters.

    Wouldn’t it be a wiser approach to allow downloading of the script locally? That way people could place it on their servers cutting out that dependence altogether.

    Just an observation. Thanks again.

  13. netultimate

    thank u for ur information on web analytics


Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share This