Support » Plugin: GDPR Cookie Compliance (CCPA ready) » Disable Adsense anchor ads until user accepts cookies

  • Resolved kacper3355


    Hi. I’m using your plugin and the cookie banner is positioned at the bottom of my page. I enabled Adsense anchor ads on my website, but had to disable them soon after because anchor ads overlap cookie banner. My question is, is it possible to hide JUST anchor ad until user accepts cookies? This way the overlaping issue would be non-existent.

    Or maybe there is any easier way to fix this issue? I can’t show cookie banner on top of my page so it’s not really a solutions.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Moove Agency


    Hi Kacper,

    When the cookie banner is visible, you can see an extra class in <body>. Based on this, you can hide the Adsense anchor ads until the banner is visible, like:

    		body.gdpr-infobar-visible [your_adsense_container_class_or_id] {
    			display: none;

    Hope this helps.

    Thread Starter kacper3355


    Hi @mooveagency

    Thank you for your reply, but anchor ads don’t really have a class or id. This kind of ads can be enabled via Adsense dashboard, not via some sort of code placed on website.

    Knowing that, I’m not sure how can I utilize this code. Can you be a little more specific, please?`

    Thread Starter kacper3355


    @mooveagency do you have any other ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable Adsense anchor ads until user accepts cookies’ is closed to new replies.