Is Google Analytics Installed Properly?

As I’ve written about Google Analytics quite a bit on this blog it’s probably quite obvious that I think very highly of this free service.  Making sure that you have the code installed on your site properly is a very important initial step.  The problem is that once you have it installed the only way to know if you have it installed properly is to sit and wait for the service to begin collecting data.  If you have a gigantic website, like a huge college website, then even when you are collecting data sometimes you aren’t even sure if every page is collecting simply be cause you have thousands of pages.  Luckily there are a few options to help.

Installing Tracking Properly

Remember that you want the code installed as close to the closing body tag as possible.  Although technically there is no reason for this, the service will work just fine if it’s installed in the header of your page, it is considered a best practice.  Because it is loading an external element to your page you don’t want it slowing down the load time of your page for your user, so making sure that the rest of the page is loaded before trying to load external tracking is good for your user.  This is a best practice for any external javascript tracking code not just Google Analytics.  While it’s true that Google has some of the best and most nimble servers in the world you would rather your visitor being at the mercy of your web server loading properly first than an external service.  If your server is down then the last thing you care about is tracking a visitor.

(UPDATE: As Paul Prewitt points out in the comments installing the code at the bottom is only for basic setup.  If you are going to be performing .)


SiteScan is a free service that will scan your site checking to make sure that you have your tracking code installed on every page of your site properly.  It will also report on any additional tracking parameters that you have set on a page.  Because this is a bot that crawls your site it is only able to crawl pages that a normal bot would be able to crawl.  Meaning that it follows robot.txt and cannot crawl password protected content.

SiteScan also offers paid level services that will crawl large sites and can be scheduled to

Firefox Add-on Checkers

I mentioned WASP in my Firefox Add-ons post months ago.  WASP will show you which analytics tracking code, if any, is on a page.   WASP is also fun for when your surfing the web to know what tracking your favorite sites are using.  Ok so maybe I’m the only one who finds it kind of interesting to know what analytics other websites use.  It is best to get WASP off their website instead of the Firefox Add-ons site.

GA? is another Firefox Add-on that will tell you if Google Analytics is installed on the page properly or not.  I haven’t used this add-on because it seems limiting compared to WASP, but it is still worth mentioning.


Of course it’s always true that you could simiply visit every page of your site and View Source to see if Google Analytics is installed on a page or not.  That just seems like too much work and with these wonderful tools you don’t need to do it.

8 Responses to “Is Google Analytics Installed Properly?”

  1. Says:

    Thanks for mentioning WASP! There are several differences between SiteScan and WASP.

    Among others:
    - WASP works on secured areas, intranets, transactions, etc. (SiteScan use the cached version of your site as seen by Google)
    - WASP works “in context” of your browser session, so you get the real picture
    - You can also use WASP to crawl your site
    - WASP detects 121 different tools
    - WASP runs immediately, no long delays waiting in a queue to be processed…

    Hope that helps! :)

    Stéphane Hamel
    Creator of WASP

  2. Says:

    Hey Stéphane,
    I didn’t even realize that WASP had additional levels of support and that it could crawl through pages on a site. Definitely need to get refreshed on the functionality of this plugin. Thanks for drawing that to my attention. This is actually pretty exciting. :)

  3. Says:

    I would strongly argue against the comment “close to the closing body tag as possible” this is only true for “basic” tracking…

    If you’d like to get fancier tracking and say know how many times someone downloads a PDF file or something then you’ll need to move it up.

    From Analytics Help:
    “Important: if your pages include a call to _trackPageview, _setAllowLinker _trackTrans(), your Analytics tracking code must be placed in your HTML code above any of these calls. In these cases the tracking code can be placed anywhere between the opening tag and the JavaScript call.”

    Therefore, my suggestion is that if you are going to take full advantage of the Analytics Program that you place the code directly after the opening tag (for consistency/templates).

  4. Says:

    I am addicted to WASP! The perfect tool for analytics geeks!

  5. Says:

    Thanks for pointing this out. I had always read that it was best to put it at the bottom of the page and even on the Google Analytics help they “recommend this for basic installation”. After doing some additional research your are completely correct… hum… it makes me wonder if this might account for why some of my tracking seems to report what I always assumed was low conversions?

    Anyway I’m going to update the post right now. Thanks!

  6. Says:


    I have a question about tracking web sites. I came across a person who can add or drop the websites from google search based on whether I searched for him or not. Do you think it is possible? Can we add Google Analytics tracking code to public profiles like Facebook or Plaxo. I was able to add tracking code in Myspace but it did not work. Any help of yours in understanding this topic will be appreciated.


  7. Says:

    Kyle, as usual, You are great!
    Frankly speaking, I’ve not been thinking about such problems in tracking. But now I’ll check all my sites.

  8. Says:

    Thanks for mentioning WASP! There are several differences between Site Scan and WASP.Definitely need to get refreshed on the functionality of this plug in. Thanks for drawing that to my attention. This is actually pretty exciting.Therefore, my suggestion is that if you are going to take full advantage of the Analytic s Program that you place the code directly after the opening tag Can we add Google Analytic s tracking code to public profiles like Face book or Plaxo.thanks for the nice info..