Skip to content

Instantly share code, notes, and snippets.

@riconeitzel
Forked from ashsmith/onepage.phtml
Last active August 29, 2015 14:18
Show Gist options
  • Save riconeitzel/30498a2d92c329e6c9d3 to your computer and use it in GitHub Desktop.
Save riconeitzel/30498a2d92c329e6c9d3 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
Checkout.prototype.gotoSection = Checkout.prototype.gotoSection.wrap(function(parentMethod, section, reloadProgressBlock) {
// Call parent method.
parentMethod(section, reloadProgressBlock);
var _gaq = _gaq || [];
try {
// push current checkout section to google analytics if available.
_gaq.push(['_trackPageview', '<?php echo getUrl('checkout/onepage'); ?>' + section + '/']);
} catch(err) {
// silent fail.
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment