Neptune Web | Boston-based digital marketing agency: Website Design, Website Services, SEO, Marketing Automation Neptune Web

Where to Place Web Analytics Code on your Web Pages

On your site, we've added Google Analytics to the footer, not the head tag. There is a bit of a debate about this, but Google has started saying people should put the analytics in the head tag.
If you insist on that, it would go here.
Since I'm not a marketer though, I prefer to use the footer for the analytics scripts. This is because including Javascript at the bottom of the page improves performance, but comes at the expense of degraded analytics data for pages which haven't completely loaded yet (and vice versa for head tag location). The higher up in the page, the earlier it loads, and the better for analytics quality, but worse for performance.
_Includes/footer.aspx is where to put it if you want better page speed.
The performance problems can be very intermittent. They result in an awkward, slow loading pages if you have too many tracking codes. Personally, I think these analytics systems are getting overused on many sites.

This is the newer “async” method for Analytics.  In it, they admit that moving the script higher in the page causes the page to be slower. Async takes care of that problem.


Neptune Web is a full-service Boston-area interactive web and digital marketing agency with expertise in Website Design, Web Development, Digital Marketing Strategy and Execution.

We look forward to your comments and would be most happy to address and help solve any Digital Marketing or Website Design & Development challenges you may have.

comments powered by Disqus