zadigetvoltaire / nuxt-gtm

Nuxt 3 module for Google Tag Manager
https://www.npmjs.com/package/@zadigetvoltaire/nuxt-gtm
MIT License
59 stars 3 forks source link

Load script tag within <head> tag #33

Open motion-work opened 2 months ago

motion-work commented 2 months ago

Is there an ability to load the script tag:

<script async="" src="https://www.googletagmanager.com/gtag/js?id=GTM-XXXXXX&amp;l=dataLayer"></script>

within the head tag instead of within the body tag?

bjarnef commented 1 month ago

It would be great if this was a module option as it is recommended to insert into <head> of document. https://nuxt.com/modules/nuxt-gtm#modules-options

Some other plugins/modules in other frameworks has something like this appendTo: head | body

michaelrachlitz commented 2 weeks ago

Yes, need this :)