Hey so I came across this article – https://support.google.com/analytics/answer/1008080?hl=en and many other Google articles like it that say your tracking code should go immediately before the </head> tag.
I thought traditionally, this has always been done in the footer, right before the tag? In fact, many Wordpress Themes allow you to insert your tacking code into the WP Backend and it’s automatically placed at the bottom of the page before the tag.
Can anyone explain if there is a difference, and which one if any is better? Thanks.
Google requires the tracking code to be in the HEAD tag to be able to use it to verify your website ownership via the Google Webmaster Tools: https://support.google.com/webmasters/answer/185871?hl=en
Google Webmaster Tools is a set of tools for SEO and site analysis, especially useful when you wish to find the search keywords, etc
Otherwise, if you don’t use the Google Webmaster Tools, then you can place the code before the ending BODY tag.