Debugging and Testing Google Analytics

Recently, I’ve been answering a few web analytics questions over on StackOverflow.com.  One of the things that keeps getting asked or I’m pointing people towards is how to test and/or debug Google Analytics calls.  Whilst this is a pretty basic task there seems to be a fair amount of misconception regarding the best way to understand whether your GA implementation is functioning as you are expecting it to.

As a quick guide, here’s the normal steps we take to ensure data is being collected correctly.

  1. Check the realtime analytics in your Google Analytics reporting interface.  Unless you’ve already setup filters to ignore traffic from your own IP, you should see data coming into the reports now.
  2. Utilise the Google Analytics debugging functionality which gives you a verbose output in console of exactly what the GA code on your page is doing.  There are 2 different ways you can do this:
    1. Use the GA debug plugin for Chrome
    2. Activate the GA debug functionality by referencing analytics_debug.js instead of analytics.js in your GA page code tag (this is exactly what the GA debug plugin for Chrome does automatically).
  3. Inspect the raw HTTP calls to google-analytics.com/collect? etc to see exactly what tracking calls are being sent off to GA.  This is the most reliable way to see whats going on as, on occasion, the Realtime analytics and GA debug don’t reveal the full story.  There are numerous ways you can do this including:
    1. Using the Network tab in Chrome or similar functionality in your chosen browser’s developer tools.
    2. Utilise an HTTP debugger/collector such as Fiddler or Charles.  (Wireshark is also an alternative but is a bit of overkill for this purpose)
  4. After collecting some data for a few days you can certainly check the data in the main reporting interface of GA and decide whether you need to make any updates to your implementation.

Inspecting the raw HTTP calls is the most reliable way that I’ve found to identify any issues in your implementation.  It allows you to do 2 main things:

  1. See exactly what  tracking calls are being fired and when they are being fired too.
  2. See exactly what parameters are being populated and when – this is key to understanding the data that is being sent to GA.

To help you understand what each of the URL parameters mean in the Google Analytics HTTP calls, I’ve produced a reference sheet over at Cheatography.com.  I’ll keep this up to date so keep checking back for new parameters.

 

If you need further help with anything Google Analytics and Google Tag Manager from planning and implementation through to reporting and dashboarding then please get in touch with us, we’ll be happy to assist.  Don’t forget we’re GA and GTM certified partners and work with some of the world’s biggest brands on their digital analytics (and many smaller ones too!).

By | 2017-04-18T15:59:10+00:00 October 30th, 2015|Digital Analytics, Google Analytics|0 Comments

Leave A Comment