Support » Plugin: GDPR » block cookie

  • Resolved paolapisano


    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? 🙂


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


    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' ) ) : ?>
        window['ga-disable-UA-XXXXXXXX-X'] = true; // Replace 'X' for your UA numbers.
    <?php endif; ?>

    I hope that helps you out.

    Thread Starter paolapisano


    Thanks a lot!

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