nuxt-modules/google-adsense

How to block adsense until consent is given (to be in line with the GDPR)

christian-reichart opened this issue · 2 comments

Hi there!
I was wondering if there is an easy way to disable the adSense integration with this plugin and enable it once the user has given consent.

Any hints on this? Thanks :)

Hi!
Pretty simple.
You need to initiate the script as usual, but before u push data to google you need to run stop command and ads will not load.
After that you check for user agreement and push the decision to Google with command from manual. And than push command to start ads.

I use nuxt-cookie-control for getting user consent.

I opened a feature "ads on pause", but it stuck in github process ;) . There u can find the modifications how to stop ads and run it again.
Also google AdSense manual for addition. You can also modify to run personal ads with that.

Just merged @seosmmbusiness's PR and will release v1.4.0 with the feature