With the rise in popularity of single-page applications (SPA) it has become important to ensure your tracking and events are still working for you.
Set up your Google Analytics script as per usual and then call ga('set', 'page', ...) and also ga('send', 'pageview') every time someones clicks on your site's menu. That way you can still track interactions with your site and your measured bounce rate will also improve!
$('.navbar-nav a').click(function () {
ga('set', 'page', '<<page-name>>');
ga('send', 'pageview');
});
Up to date link: https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
Talk to us @ Magnetika
No comments:
Post a Comment