• Resolved stefancamargo

    (@stefancamargo)


    Hi,

    What is the prior consent code for auto ads?

    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: “ca-pub-******”,
    enable_page_level_ads: true
    });
    </script>

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey Stefan,

    To add prior consent you need to add the data-cookieconsent attribute to the second script tag. You can check the example for AdSense here: https://support.cookiebot.com/hc/en-us/articles/360003812773-AdSense-cookie-consent

    Regards,
    Martin

    Thread Starter stefancamargo

    (@stefancamargo)

    Hi,

    Sorry, but that code is a bit different from that of the auto ads. Could you please show me exactly where the attribute is included?
    Thanks

    Hey @stefancamargo,

    Put data-cookieconsent attribute in the script tag and
    that’s what your code should look like:

    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”
    type=”text/plain” data-cookieconsent=”marketing”></script>
    <script type=”text/plain” data-cookieconsent=”marketing”>
    (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: “ca-pub-******”,
    enable_page_level_ads: true
    });
    </script>

    Try it and please let me know, if something is wrong.

    Regards, Martin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adsense – auto ads’ is closed to new replies.