Google suggests right before the ending body tag, but if a visitor leaves before the script has loaded you won't see them. You may want to consider putting it right after the body tag. That is what I do. You need to just be smart about it. If you have a ton of javascripts already loading on your page things get messed up or not always downloaded. Prioritize.
Google suggests just before </body> tag. But I suggests always keep it in the <head> tag. So if whole page not uploaded then too your GA track the visitors. -------------Vishal
I've got to agree with Camp185, post the analytics code just after the <body> tag towards the top of your page and then a hit will get recorded even if the page does not fully load. The html code of each page. If you don't know what html is, you're fighting a losing battle
I usually go by the book and put it before the </body> tag, but that's good thinking to put it in the header because it's true that if the visitor leaves before the page loads, Google wouldn't pick up on it in the analytics
hi, you have to paste analytic code just before to </body> of every page. To include code for every page u have paste it just before to </body> in footer in include folder.