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.
- 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.
- 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:
- Use the GA debug plugin for Chrome
- 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).
- 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:
- Using the Network tab in Chrome or similar functionality in your chosen browser’s developer tools.
- Utilise an HTTP debugger/collector such as Fiddler or Charles. (Wireshark is also an alternative but is a bit of overkill for this purpose)
- 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:
- See exactly what tracking calls are being fired and when they are being fired too.
- 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!).