title: Nuxt add GTM (noscript) to body tag on every page / route
body: <p>I am trying to implement Google Tag Manager on a Nuxt app and am stuck on how to add the noscript tag to the app on every page / route inside the opening body tag. I tried creating a static script and adding the file through the nuxt config:</p>
  <pre class="lang-js prettyprint-override"><code>{ src: &quot;/scripts/gtm.js&quot;, body: true }
  </code></pre>
  <p>which added the file to the body but was throwing errors due to the noscript tag and nested iframe from gtm. Not sure if there is a better way to inject the actual script directly inside the body</p>
  <pre class="lang-html prettyprint-override"><code>&lt;!-- Google Tag Manager (noscript) --&gt;
  &lt;noscript&gt;&lt;iframe
  src=&quot;https://www.googletagmanager.com/ns.html?id=GT
  M-4BXKY65&quot;
  height=&quot;0&quot; width=&quot;0&quot;
  style=&quot;display:none;visibility:hidden&quot;&gt;&lt;/iframe&gt;&lt;/n
  oscript&gt;
  &lt;!-- End Google Tag Manager (noscript) --&gt;
  </code></pre>