The Analytics Pro's Tools of the Trade

Tuesday, April 28, 2009 | 2:07 PM

Labels: ,

Just as having the right web analytics data is critical to making smart marketing decisions, having the right set of tools is equally imperative when it comes to testing & tuning your Google Analytics implementation. Read on to discover the tools used by one Analytics Pro in troubleshooting and solving Google Analytics problems every day.

Why you need tools and what you can use them for


Implementing Google Analytics can be easy - just copy and paste the script produced during the account or profile creation process, right? Yes, and no. For more complex websites, it's a good idea to take some extra steps yourself, or hire someone, to validate your installation and make sure everything's working as it should.

When problems arise they are usually easy to spot within Google Analytics reports. Odd data such as a high degree of "self-referrals" (visits being reported as "referred" from your own domain name), a strangely high rate of conversions for an unexpected traffic source or medium, or an amazingly low bounce rate (3.8% bounce rate isn't really good, it's broken) are signs something may be wrong.

Enter the toolbox! In it you'll find an array resources for quickly identifying the root causes of Google Analytics anomalies - those most commonly being
  • JavaScript errors,
  • cookie problems, or
  • client-side page load time issues (not to be confused with slow connections... this is different).

Tools every Google Analytics professional should have


1) The Browser to Start with: Firefox

The Firefox browser is probably the most important tool for technical debugging work with Google Analytics. The browser itself isn't what matters so much as the myriads of add-ons that are available for it. To get started on building your toolbox, get Firefox if you don't have it already (and don't worry, there are some tools for Internet Explorer too!).


2) Working with JavaScript: Firebug for Firefox

This is where the march of add-ons for Firefox begins. The first and probably most important tool in the box is Firebug, an add-on for Firefox. Use the following Firebug features when debugging Google Analytics implementations:
  • Detecting JavaScript errors quickly and easily - identify the script and line of code within the script that is the culprit
  • Testing JavaScript code within the browser environment without having to edit an actual page on the server using the script console window in Firebug


Firebug can do much more than just detect script errors and help you rapidly test JavaScript, but these applications are particularly useful for Google Analytics technical work, especially when used in conjunction with additional tools detailed below.


3) Working with Cookies: Web Developer Toolbar in Firefox

The Web Developer Toolbar is most useful for Cookie analysis and diagnosis when working with Google Analytics. It is much faster to use when needing to view just what cookies have are currently set for a given page you are viewing. You can easily see key information for each cookie, find the "utm" cookies, and view details such as the domain the cookies were written for and what the values are.


4) Tracking the Data Stream: Live HTTP headers

Debugging JavaScript and cookies is where troubleshooting begins. Once you are confident the scripts are working properly and cookies are appropriately set, the reporting mechanism for Google Analytics, the utm.gif tracking hit, must still take place in order for data to be reported into your Google Analytics account. Live HTTP headers is a tool of choice for identifying when these utm.gif tracking hits take place.

Bonus configuration option for Live Headers: under the "config" tab enter ".*__utm\.gif.*" (without the quotes) into the "Filter URLs with regexp" field, and make sure the field is checked. This will limit the Live Headers window to only show utm.gif hits, otherwise finding one or two utm.gif hits amidst all the other requests that will fly by may feel like the proverbial search for a needle in the haystack



5) Page Execution Speed: Chrome JavaScript Console

The JavaScript Console in Google's new Chrome Browser is perfect for detecting potential issues on sites that have a lot of other JavaScript running or have the Google Analytics tags placed on the page in a manner that other elements may slow down the code from running. The JavaScript console "resources" pane shows the number of seconds it takes for the Google Analytics script to be loaded and the utm.gif tracking hit to run.Consider this example: it took 6.58 seconds from when the browser began loading this page to when the ga.js file was loaded - and it took even more time before the utm.gif hit was fired! How many people leave before 6.58+ seconds? We will never know because of a latency issue on this page.

Tip: using this tool, if you detect a latency problem, consider optimizing the other JavaScript running on your site, optimizing image files, or placing the Google Analytics code higher in the page so that it does not have to wait for everything else to complete before it runs (note that placing the code in the of the page can bring some additional dependencies with it, so consider seeking the counsel of an experienced Google Analytics professional if considering this change).


Tools for Internet Explorer

While many will argue that Firefox or Chrome is a "better browser," we must face the reality that, for now at least, Internet Explorer sill leads the global market in browser use. Thus, if you do all your debugging in Firefox or Chrome, you may easily miss problems that would arise for Internet Explorer users. Or perhaps you're already aware of such problems and need to diagnose them further. Here are a few tools that are available for IE.


6) JavaScript Debugging in Internet Explorer: DebugBar

DebugBar is sort of like an Internet Explorer hybrid incarnation of the Web Developer Toolbar and Firebug add-ons for Firefox. Using this tool you can track down JavaScript errors in Internet Explorer in the same way Firebug works, plus some advantages. You really have to check it out to get a feel for all the features. Bottom-line: use this tool for analysis of JavaScript errors you suspect are holding up accurate Google Analytics reporting.


7) Live Data Stream Analysis in Internet Explorer: Fiddler2

Fiddler is like Live HTTP Headers, except that it is a standalone application that can detect HTTP traffic between any application your computer and outside web servers. This makes it more accurate than Live Headers in Firefox. It can be used with Internet Explorer, but also other browsers, including Firefox. The tools for analyzing captured requests, utm.gif hits included, are superior to Live HTTP Headers in many ways.



8) Cookies in Internet Explorer: IE Cookies Viewer

This small but powerful tool lets you easily find, view, and even modify cookies for Internet Explorer. It is indispensable for Google Analytics diagnostic and troubleshooting work when encountering cookie domain issues.




In Conclusion

So, there you have it: a plethora of tools that are tried and true means to the trouble-free Google Analytics end you're seeking. Here's a recap shortlist of the tools:
Posted by Caleb Whitmore of Analytics Pros, a Google Analytics Authorized Consultant

11 comments:

barnaclebarnes said...

Charles is also a great tool for looking at the http traffic and will work across all browsers and widgets (it sits in between the browser and the internet connection). I tend to use this in addition to the tools above as the UI can be somewhat easier to use when you are dealing with more complex issues.

Chris Miller said...

I tend to use FireCookie for cookies as it integrates right into FireBug as it has a better cookie editor and cookie export options.

Another add-on that I find invaluable when working with Fiddler and Firefox is FoxyProxy which allows you to send Firefox traffic to Fiddler with a single toggle action or simply monitor the AutoConfig file ("%USERPROFILE%\Documents\Fiddler2\Scripts\BrowserPAC.js").

Fiddler will always be the big daddy though with the ability to write custom scripts. I have a script that detects Analytics calls and writes them out neatly to their own column in the Fiddler UI. Happy to share if people will find it useful.

Jonathan.Georger said...

Thanks for a great post Caleb! Enabling the response headers in Firebug has been a huge help for me to understand if utm.gif is passing correct parameters between 3rd party sites. Hope all is well!
- Jonathan

Ophir Prusak said...

Great article Caleb.

My personal favorite for HTTP level debugging is HTTPWatch.

It's not cheap (around $400) but it's fullest featured HTTP debugging tool I've ever seen.

Stephane Hamel at immeria.net said...

(disclaimer: I'm the creator of WASP)

I'm surprised you didn't mention WASP, the Web Analytics Solution Profiler, in your list. WASP is the only tool specifically designed to validate tags in context of a real browser session. If the only thing you want to do is check Google Analytics tags, you could replace the Developer Toolbar and Live HTTP Headers and benefit a much easier and efficient way to check your tags without the hassle of technical tools. The free evaluation version of this Firefox extension can be downloaded from WebAnalyticsSolutionProfiler.com

Regards,
Stéphane Hamel
http://immeria.net

Slugger said...

I know this is a google blog but I love the YSlow firefox add-on (from those other guys ;-) for addressing latency issues. It's a great tool for optimizing your site.

And now I'm going to go check the placement of my tracking codes.

Keep up the great work guys!

Caleb Whitmore said...

Thanks for all the comments!

@Steve: Thanks for the suggestion for a future post topic. I can say that there are a number of good resources for further training and skill development. The first one I'd recommend to you are the new Conversion University videos for the Google Analytics Individual Qualification test. You can find out more here: [link].

@barnaclebarnes: thanks for the tip about Charles. I've heard about the tool before but never used it personally. I believe it is a paid tool, correct? How does it compare to Fiddler?

@Stephane Hamel: Reasonable question! I use WASP personally (and I do recommend others use it to), however I did not include it on this post because I've found it to be useful for initial code presence detection, but for in-depth troubleshooting I prefer to use tools that aren't as precise for only Analytics data - seeing the full header stream is usually an important step in debugging in my experience.

@Slugger: thanks for the comment and tip about YSlow!

@Chris Miller: thanks also for the comment and tips about FireCookie. I'd love to see your script for Fiddler too!

@Ophir Prusak: thanks for reading and the tip about HTTPWatch. How does it compare to Fiddler?

@Jonathan.Georger: Great to hear from you! Good point about using Firebug for response headers. That is a good method to use for tracking utm.gif hits in place of LiveHTTPHeaders. It does also have the advantage of breaking the utm.gif hit parameters into a more readable format. One thing I've found though is I often need to be looking at other components in Firebug while also watching the HTTP header stream, which is why I more often use both tools.

-Caleb Whitmore

John said...

What a fine post, thanks for that. Most of the tools you mentioned I like using. The one I was not aware of was Fiddler2...now added to my arsenal.

I also like using Link Sleuth on set ups that I am not familiar with architecture. This is how I use it http://robertssemsystem.com/index.php/website_analytics/analytics_adwords/step_1_get_to_know_analytics_and_your_site/

Caleb Whitmore said...

@John: thanks for reading and commenting! I use Xenu Link Sleuth too but chose not to include it in this post for brevity's sake. Great tool though and the post you linked to has some great tips also - thanks for sharing!

hemu said...

Hey guys,

i am looking for a tool which will spider my entire window and will make a log of all the JS errors which appears to the users for both IE and FF browsers..Please help me out.

Thanks
Hemant

Caleb Whitmore said...

Hemant,

I don't know of a tool that does exactly what you're looking for. I recommend Firebug for Firefox and DebugBar for Internet Explorer.

You should also look into Page Speed from Google: http://code.google.com/speed/page-speed/index.html. I don't think it's an exact fit for your request, but it is also a good tool.

Best,

-Caleb