Tuning Google Analytics for Dense Pages

It has become increasingly common for websites to put all information for a product on a single page and deliver that information to the user in manageable chunks through JavaScript  or CSS or some other web-devilry.  This presents an Analytics conundrum for these sites, which many site owners won’t even bother themselves with.

But you might want to bother.  Especially if you’re working on a new site—one which either hasn’t had Analytics turned on yet or hasn’t gathered a significant amount of data.  So…

…what’s the deal?

The conundrum is how you will track user interaction with the page.  Consider the following product page:

 

Product Page

It’s a Product Page.

 

The page loads all of the product content but hides some from the user until he clicks on the “Specification” or “At A Glance” tabs.  Doing so will result in the visible information pane being swapped for the other.

Analytically speaking, there are essentially two options when a user clicks a tab: track an Event or a Pageview.  The reasoning behind using one or the other may not be apparent at first glance.  And Event Tracking is normally used to log when the user interacts with a page element, such as a button or video.  So...

...why track these interactions as Pageviews?

The greater part of the content of the page is changing whenever the user clicks on one of these tabs—beside an overview and specification page we might have a review tab or others depending on the site in question.  The first point for Pageviews is that the user isn’t just interacting with a page element; he is effectively receiving and consuming new content.

The second point is the clincher for me, personally: think of all the useful metrics you get if you track Pageviews!  You can see how long users spend looking at different information sets, or what they looked at last before they put the item in their cart.  You can set goals based on Pageviews.  An Event is just a click.  Sure, I can get the number of clicks on each tab with Events, but what does that mean to me?  Is that the actual metric, or is how much time is spent looking at reviews vs specifications more important?  And of course I get those total clicks with Pageviews anyway.

Closing Thoughts

This Analytics strategy has provoked some debate around the office; whether or not it is right for your site really depends on the way you conceptualize your site’s content.  I stand by my preference for the Virtual Pageview tracking method; a Pageview does not need to be defined by a request to the server!

The main concern, hinted at above, is that there will be some difficulties if you have been tracking analytics for a while: this change would significantly alter a lot of metrics that you might consider important internally.  Weigh the benefits.  Annotate your analytics to highlight the difference.  If you want to maintain the integrity of your historical metrics, you may want to create a new profile for your site in Google Analytics.  You can then filter your original profile so that it does not include the Virtual Pageviews.  Your new profile won’t contain historical data, but it will start to collect your new Virtual Pageview data immediately.  Or just create an advanced segment to see the data you need.

Wait!  How do I...

Relax, if you’re worried about implementing this, it’s easy; we just drop a little onClick action into the <a> tags around the tabs:

<a onClick=“_gaq.push([’trackPageview’,’/product-id/tab’]);”>

Of course, in this case we would need to replace ‘product-id’ with a reference to the product in question, and change ‘tab’ to indicate whether the <a> tag is referencing the ‘At A Glance’ or ‘Specification’ tab.  Your site architecture may suggest a different URL structure.  For more, check out Google’s description.

…and that’s all there is to it.

Follow BenjaminEstes on Twitter

Benjamin Estes

Benjamin Estes

Benjamin is a senior consultant who joined Distilled in 2010. Having earned a BA in Mass Media, his intention is to continue studying the ways in which people interact with media and apply those lessons to his consulting. Ben-h264 // Born and...   read more

Get blog posts via email

3 Comments

  1. Nice! I am just putting together a huge document with all sorts of ideas on how to make our product pages look better. Right now they have the little tabs with CSS and it would be nice to see how many people are actually clicking on them, rather than just changing it. I'm tempted to go the Amazon route with the information scrolling down the page with some video features.

    My first option is to figure out if we can split test it but I don't think we can. Thanks for the code. I'm bookmarking it right now!

    reply >
  2. Holy cow,
    It never even crossed my mind that these dynamic elements wouldn't be recorded via analytics. And as someone who's guilty of using Javascript wherever it benefits the user experience this kind of thing crops up quite a lot.
    Thanks for the tip. I find Google Analytics endlessly confusing.
    Kris.

    reply >
  3. That's for the feedback, Kris and Kristi. A bit of a small audience for this subject, perhaps, but I was sure that someone would find it enlightening :)

    reply >

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>