I have a magento store and I am trying to track the progress of users at the checkout process.
I have the Onepage checkout enabled – which does some ajax stuff to essentially load 6 different steps in an accordion format. I would like to track each step with Google Analytics so i know whats putting the users off.. I found this link (http://magentoexpert.co.uk/2009/03/08/tracking-one-page-checkout-abandonment-with-google-analytics-properly/) to do so with Google Analytics – but it uses the old GA code. I am using the Async code which uses the gaq push.
So here is the code they recommend to use.
gotoSection: function(section)
{
try {
pageTracker._trackPageview('/checkout/' + section + '/');
} catch(err) {}
section = $('opc-'+section);
section.addClassName('allow');
this.accordion.openSection(section);
},
To update this to the Asynchronous version, would i use:
gotoSection: function(section)
{
try {
_gaq.push(['_trackPageview', '/checkout/', + section + '/']);
} catch(err) {}
section = $('opc-'+section);
section.addClassName('allow');
this.accordion.openSection(section);
},
Do i need the catch(err) ? What would be the full code – this doesn’t seem to work for me?
I believe that the Fooman GoogleAnalyticsPlus extension on MagentoConnect will do what you need. YMMV.