GA Code positioning when Non Standard Implementation
I have added my Google Analytics code to my site layouts/theme.php file just above the <head> as directed by Google. Which was all fine.
However using Google tool Tag Assistant I'm told by Google I should move code higher into the html after getting "Non Standard Implementation" messages on some pages when testing pages with Google Analytics.
It seems some scripts are being loaded before GA code fires so I'm possibly missing out on some traffic recorded.
Apart from the layouts/theme.php file, where else specifically (another template file?) could I rather add the GA code for it to be the highest loading script?
Re: GA Code positioning when Non Standard Implementation
That's completely dependent on what CMS you're using or how your site is set up. I'd recommend you speak to your developer or ask on the support forum of whatever CMS your are using.
Alternatively, you might want to look at Google Tag Manager which will take care of that for you.