0👍
You shouldn’t modify any generated html code in your Nuxt app. What you should do instead is create/use a plugin.
There is a GoogleTagManager wrapper plugin for Nuxt.js that you should use instead:
https://www.npmjs.com/package/@nuxtjs/google-tag-manager
Follow the instruction and you will be ready to go.
Source:stackexchange.com