In a Magento 2.1.2 store under Stores -> Configuration -> Sales -> Google Api I entered the Google Analytics code. After a couple of days I noticed no information coming in and my customer had a mail from Google saying the URL was no longer valid for the Merchant account.
I found that my customer had a Universal Analytics code
(compared to the "old analytics code" and that Google demands it to be within the < head >
tags whereas Magento 2.1.2 places it within the < body >
tag. This Universal Analytics code has been around for 4 years and even with the old code it was recommended to place it within the < head >
tags.
My question is, why is it that even in Magento 2 the Google Analytics code is placed within the body tags? Is there a good reason for it or am I missing something?