• Resolved paolapisano

    (@paolapisano)


    Hi,
    i’m trying to use your plugin. For cookie consent do i have to modify manually some code?
    I tried to use it on my site, but, even if i declare not to use some cookie, they works anyway.
    For example _ga, _gat etc.

    What am i doing bad? ??

    thanks
    Paola

    • This topic was modified 6 years, 7 months ago by paolapisano.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Fernando Claussen

    (@fclaussen)

    Hi @paolapisano,

    You do have to manually change the code.

    We provide a few helper functions. For cookies, you have is_allowed_cookie( 'cookie_name' ).

    You can use this for not loading the snippet that creates the cookie.

    Google Analytics and probably others also provide a different way to opt-out.

    For GA you could do the following.

    <?php if ( ! is_allowed_cookie( '_ga' ) ) : ?>
      <script>
        window['ga-disable-UA-XXXXXXXX-X'] = true; // Replace 'X' for your UA numbers.
      </script>
    <?php endif; ?>

    I hope that helps you out.

    Thread Starter paolapisano

    (@paolapisano)

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘block cookie’ is closed to new replies.