Finding Errors in Your Google Analytics Tracking Code

0 Shares Twitter 0 Facebook 0 LinkedIn 0 Pin It Share 0 0 Shares ×

Installing the Google Analytics code is pretty easy – usually nothing goes wrong, and it is simply a matter of copying and pasting the code that Google provides you with. However, there are some cases where you might want to change the default code:

Google provides clear instructions for these tasks but nobody is perfect so sometimes errors will be made and nothing will be tracked. Normally it would take you 24 hours to realise this, 5 minutes to fix what you thought was the error and then 24 hours to find out that you hadn’t actually fixed anything. Repeat this cycle until you give up or get it sorted. Here is my guide to help speed this process up and make it less likely that a small typo in your Google Analytics code will take a week to fix.

So what do you do when there is no data in Google Analytics?

  1. Firstly, visually confirm that the tracking code is on the website. It sounds like a simple thing but you can end up looking pretty stupid if you miss this step out.
  2. Then install httpfox or some other program to monitor the requests your browser is making
  3. Start up httpfox and perform a full refresh (Ctrl-F5) of a page.
  4. In httpfox search for requests made to the domain. If you see a request for _utm.gif then you know that data is being sent to Google Analytics. Apart from checking that the UA id is correct I have no more ideas about what could be going wrong here.
  5. If there is no request for the tracking pixel then something is wrong with the code (duh?).
  6. For simple errors (like typos) the firefox error console will give you a pretty good idea of what has gone wrong.
    Firefox Error Console shows that I missed of the closing quotation marks when setting the session timeout to 5 minutes
  7. For more complicated changes to the code use a more powerful tool like firebug to find out where the error is occurring.
  8. Fix the problem and then repeat steps 3 and 4 to check that information is being sent to Google Analytics. thanks © SEOptimise – Download our free business guide to blogging whitepaper and sign-up for the SEOptimise monthly newsletter.


Leave a Reply

Your email address will not be published.