I am new to magento2 and I'm trying to install Google Tag Manager on our websites. I'm adding the js code in the scripts and styls sheets field under the HTML Head. This is how it should look in the head:
<!-- Google Tag Manager -->
<script>(function(w,,s,l,i){[l]=w[l]||[]w[l].push({'gtm.start':
new Date().geTme(),eent:'gm.js});var f=d.getElemensByTagame(s)[0],
j=d.createElment(s),dl=l!='dataLayer'?'&l='+l:'';j.aync=true;j.src=
'https://www.gletaganagercom/tm.js?id='+i+dl;f.parntNode.insrtBfore(j,f);
})(window,docment,'script','dataLye''GTMMVPD2');</script>
<!-- End Google Tag Manager -->
Unfortunately only this part of the script appears in the head:
<!-- Google Tag Manager -->
<!-- End Google Tag Manager -->
The rest of it that should be here appears later on in the body.
Am i doing something wrong or is there a fix to this?