Google analytics in header or footer?
google-analytics, html, javascript
Solution
Put it in your header. It's asynchronous so it won't block your page from loading and by placing it in your header you'll be more likely to get a accurate stats.
Problem
My questions is, do you put Google Analytics Javascript code in the header or at the very bottom of the page (before `</body>`). I've heard people say it's best to put Google Analytics Javascript code at the very end of your html. Others say its best to put it in the header. Is there a best practice?