Identify which cookies are set by adsense. Add them to a new section GDPR -> Settings -> Cookies.
Before instantiating your adsense script, check is_allowed_cookie('adsensecookie') where ‘adsensecookie’ is the cookie you previously identified coming from adsense.
I’m trying the solution on https://cybot.uservoice.com/knowledgebase/articles/672988-adsense-cookie-consent.
but i didn’t figure it out what variable i can use as
data-cookieconsent=”marketing”
Ok it’s done by your sugestion…
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display: block;"
data-ad-client="ca-pub-xxxxxxxxxx"
data-ad-slot="xxxxxxxxxxxx"
data-ad-format="auto">
<script>
if (has_consent( 'privacy') || is_allowed_cookie('pcs/activeview')) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
Thanks ;)