Best practice for integrating Google Tagmanager

Google Tagmanager has very specific instructions for including their tags in a website.
Currently adding it to the webstatistics box does not fulfil the requirements which are:

Place the <script> code snippet in the <head> of your web page's HTML output, 
preferably as close to the opening <head> tag as possible, but below any dataLayer declarations.

Place the <noscript> code snippet immediately after the <body> tag in your HTML output.

The current option inserts included js at the end of the page.

Thinking aloud

Should we be thinking about a "script in head" box and "insert at beginning of body" option for the site controlpanel?

we use this package to solve those issues:

yeah! :raised_hands: this looks good.
Thanks @hvelarde.

I usually add it in the normal webstats config setting, and then move it into place using a Diazo rule.

Hi, i recently implemented an Add-on for Google Tag Manager integration here