• Anonymous User 14701108

    (@anonymized-14701108)


    I’ve added list of cookie, sites and description. All cookies are set to off but when I load my website all cookie are enabled.

    How can I disable all cookies?

    • This topic was modified 6 years, 6 months ago by Anonymous User 14701108.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter Anonymous User 14701108

    (@anonymized-14701108)

    I’ve added the code in function.php but in single products pages it activate itself without any consent.

    For all codes (like NID and others) I have to repeat that code like here?

    add_action( 'wp_head', 'marketing-esterno' );
    function marketing-esterno() {
      if ( ! has_consent( 'marketing-esterno' ) || ! is_allowed_cookie( 'NID' ) ) {
        ?>
    
    add_action( 'wp_head', 'protezione-spam-e-sicurezza' );
    function protezione-spam-e-sicurezza() {
      if ( ! has_consent( 'protezione-spam-e-sicurezza' ) || ! is_allowed_cookie( '01AI, GAPS' ) ) {
        ?>

    @andreagilfone

    Yes, for now you do need to repeat the code.
    I dont know why, but my has_consent does not work, I only use the is_allowed cookie.

    function my_google_opt_out() {
        if ( is_allowed_cookie( '_ga' ) ) {
    ?>
            <script>
    		window['ga-disable-UA-xxxx-x'] = false;
    	</script>
    	
    	<?php
                                           }
    	else{
    ?>
    	<script>
    		window['ga-disable-UA-xxxx-x'] = true;
    	</script>
    <?php
                 }
                                   }

    This is my code, maybe this helps you. Let me know!

    • This reply was modified 6 years, 6 months ago by Willem Munts.
    • This reply was modified 6 years, 6 months ago by Willem Munts.
    • This reply was modified 6 years, 6 months ago by Willem Munts.
    • This reply was modified 6 years, 6 months ago by Willem Munts.
    • This reply was modified 6 years, 6 months ago by Willem Munts.

    @thedarkeye

    Thanks a lot its work for me.
    Do you have another example to how wrap for another cookie please

    thanks

    • This reply was modified 6 years, 6 months ago by imloic.
    • This reply was modified 6 years, 6 months ago by imloic.
    • This reply was modified 6 years, 6 months ago by imloic.
    Thread Starter Anonymous User 14701108

    (@anonymized-14701108)

    @thedarkeye
    With your code

    @andreagilfone

    Yes, for now you do need to repeat the code.
    I dont know why, but my has_consent does not work, I only use the is_allowed cookie.

    function my_google_opt_out() {
    if ( is_allowed_cookie( ‘_ga’ ) ) {
    ?>
    <script>
    window[‘ga-disable-UA-xxxx-x’] = false;
    </script>

    <?php
    }
    else{
    ?>
    <script>
    window[‘ga-disable-UA-xxxx-x’] = true;
    </script>
    <?php
    }
    }
    This is my code, maybe this helps you. Let me know!

    Analytics will be always off. Right?

    • This reply was modified 6 years, 6 months ago by Anonymous User 14701108.

    @andreagilfone
    yes, off for me too

    Thread Starter Anonymous User 14701108

    (@anonymized-14701108)

    But if you enable consent for Analytics it will be always off

    No when i enable consent analytics cookie, it become enabled

    The code we are talking about is that its STANDARD off, then when you put _ga cookie in a category option in the backend, it will be ON when a visitor accepts all your cookies. Now this will not work for everyone, because of the use of different codes/scripts. If you need help with your part of the code, I am happy to help

    Grtz William

    @imloic

    I’m still busy working on doing that with other cookies. It also depends on the cookie it self how hard it will be, for example we are lucky that google analytics has a standard code to disable their cookie, not all cookies might have that, but i will find out soon! I could keep you posted somehow?

    Thread Starter Anonymous User 14701108

    (@anonymized-14701108)

    mmm… it’s probably because I use google tag manager and not the normal header code.

    @andreagilfone

    What exactly does not work for you right now?

    Thread Starter Anonymous User 14701108

    (@anonymized-14701108)

    Analytics is yet enabled.

    @andreagilfone
    what URL can i try to see what your code does?

    @imloic
    Great, i will be working on that right now. Eventually you could send me an email that you can find on my profile, so i can keep you posted. Goodluck!

    • This reply was modified 6 years, 6 months ago by Willem Munts.
Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Cookies always enable’ is closed to new replies.