How to Track More Pageviews with Google Analytics

Track more pageviews and site traffic by adding Google Analytics Code in the HEAD  tags of your site. Probably your code is just before closing of the BODY tag.

Webmasters and bloggers usually like to place javascripts at the end of the page so that the site loads completely and the analytics js code loads last. But then this javascript code is different.

Track More Traffic with Google Analytics

I was browsing across Google Analytics setup article, where they advised to place the analytics code just before the closing HEAD tag!  This is against standard practice, but then the new Google Analytics code is a  asynchronous script, which means it will not interfere with the loading of your webpage. So it can be placed before closing the HEAD tag in your html file.  [Wordpress users can shift it from footer.php to header.php]

So what is the advantage? Since the Analytics code will be loaded (or at least will start loading) before the page is loaded, there is higher chance of tracking visitors who click back or click links before your page loads and reaches to the bottom of your page. This is especially important for heavy pages with images, and lots of scripts and widgets, where the visitor will click before the the full page (and the analytics code at the bottom) is loaded.

This will help track many more visitors who click fast or click back, and you will see your traffic statistics rising. Works for us. Shift your anaytics code from the footer to the header today.

Share with friends

About the Author: P Chandra is editor of QOT, one of India's earliest tech bloggers since 2004. A tech enthusiast with expertise in coding, WordPress, web tools, SEO and DIY hacks.