zadigetvoltaire / nuxt-gtm

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

Any idea on how to create consent for cookies? #35

Open hansroms opened 4 months ago

hansroms commented 4 months ago

I'm wondering about a scenario where anonymous users can have GTM enabled by default. When a user logs in, if they've opted out of cookies (from a BE endpoint), the plugin is disabled and the cookies are removed.

By manually updating GTM to not be enabled, the debugger successfully does not send data. However, there's still cookies being saved to the user's browser regardless of whether it's enabled. Even manually deleting the cookies continues to create them.

Is there a better solution for this issue? Is it purely from setting up a policy on Google's end? Is there a way to essentially remove the script from the application?