In practice, the Google Analytics code will work regardless of where you put it on the page. We recommend inserting it in the <head> section or after the opening <body> tag if possible. This is because the higher up it is inserted in your page source code, the sooner it will get executed after the user lands on your page. If you put your Analytics tracking code at the bottom of your code, it will be the last piece of script to get executed. Sometimes, if the user navigates to another page before the page has finished loading, the tag may not have time to fire and the data you collect will be less accurate. That's why the best practice is to put the tag towards the top of your page code.
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment