• Resolved alexis888

    (@alexis888)


    Hi, I’m in the process of testing your plugin to switch from my current one and implement it on all my clients’ websites, however I’m facing an issue.

    I have non-necessary cookies disabled by default. When I clickt the “accept all” button, the switch for non-necessary cookies stays on disabled and the value of cookielawinfo-checkbox-non-necessary stays on NO

    However, the value of viewed_cookie_policy does change to YES .

    Then if I manually click the switch to enable all non-necessary cookies, it stays to enabled on page reload and the value of cookielawinfo-checkbox-non-necessary changes to YES.

    Plus, once I have manually enabled the switch for “non-necessary cookies” once and my Google Analytics cookies have been created, they won’t be deleted / blocked no matter if I click the “reject all” button or turn off the switch manually. Which is another big problem.

    I’ve tested it on two websites, one with a cache plugin installed but cache not activated, and one without any cache plugin. They are both hosted on the same server though.

    I’ve read on this post it could be a caching issue but that you were working on providing a solution for the free version as well.

    I will try to convince my clients to buy the premium version but I can’t know for sure all of them will agree. I still want to be able to provide them a working solution if they stick to the free version, but at the moment it doesn’t seem to be possible in my case.

    Would you have any solution for these issues?
    Thank you!

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @alexis888,

    First of all, the accept all feature is available in premium version only. In the free version, you must enable the toggle button manually and then click accept.

    Secondly, to overcome the caching issue, please go to Settings > Advanced and enable the Advanced script rendering.

    Thread Starter alexis888

    (@alexis888)

    Hi @webtoffee,

    Thanks for the explanation about the accept all feature available in premium version only.
    However this is very counterintuitive as it’s still possible to include this button (or the reject all one) in the cookie notice bar in the free version but they are useless as they do not work as users would expect them to.

    Concerning “Advanced script rendering” it was enabled by default so when I wrote my initial post, all my tests have been done with that option enabled.

    And I still have this issue :

    Plus, once I have manually enabled the switch for “non-necessary cookies” once and my Google Analytics cookies have been created, they won’t be deleted / blocked no matter if I click the “reject all” button or turn off the switch manually. Which is another big problem.

    Does your plugin offer a way to delete non-necessary cookies created after user’s initial consent / approval but then when this user changes and remove his consent ( by manually toggling the swith) ?

    I’ve tried both on my website without cache plugin and the one with and Google Analytics cookies don’t get deleted.

    As of now, I’ll have to stick with the other plugin if my clients want to stick to a free solution unfortunately. But I want yours to work according to my needs as I really want to convince my clients to go with the premium version since you have very interesting features (cookie scan / consent log / granular control etc).

    Thank you

    Plugin Author WebToffee

    (@webtoffee)

    Hi @alexis888,

    Our plugin is capable of deleting the cookies once it is accepted if user revokes consent. To set proper working, kindly ensure below:

    1. Ensure that the script of GA is placed under the Non Necessary Cookie section (head or body script input field).
    2. Ensure that the same script is not added via any other means, ie directly in theme or through any other plugins.
    3. List the google analytics cookies with their correct name and ID under the Cookie List section.

    Thread Starter alexis888

    (@alexis888)

    Hey @webtoffee ,
    thanks for your answer.

    I believe I do have conditions 1,2 and 3 however it still doesn’t erase cookies when I revoke consent.

    Also, I did check this article from your website and I don’t have the “Head Scripts” or “Body Scripts” fields on the page where I can add a new cookie. I only have these two fields when I go to the “non-necessary” page. This is where I added my Google Analytics script to create the cookie(see screenshot attached).

    Is that normal ? Could that be my problem ?



    Also, I don’t know if you did set the topic as resolved or and admin did but it is not resolved yet, so it needs to stay as not resolved until it is.

    Thanks

    Plugin Author WebToffee

    (@webtoffee)

    Hi @alexis888,

    That article is for premium version instructions. Here is the free version set up guide.

    You have done it correctly if you added script under the Non Necessary Cookie head script section.

    Thread Starter alexis888

    (@alexis888)

    It seems I did everything correctly, yet cookies don’t get deleted when consent is revoked :/

    Plugin Author WebToffee

    (@webtoffee)

    Hi @alexis888,

    As discussed in the support ticket, we will be looking into the issue and will do the needful in the next update regarding the google analytics 4 script.

    Thread Starter alexis888

    (@alexis888)

    Yup your solution worked for me. I’ll post it here if anyone is facing the same issue.
    Replace G-XXXXXXXXXX by your own GA4 code

    add_action('wp_head', 'cli_ga4_compatibility');
    function cli_ga4_compatibility(){
    	if (class_exists('Cookie_Law_Info')) {
    	?>
    		<script>
    			// Enter your Google Analytics measurement ID
     var CLI_MEASUREMENT_ID = 'G-XXXXXXXXXX';
    			jQuery(function() {
    				enable_or_disable_ga();
    				function enable_or_disable_ga() {
    					if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI_Cookie.read("cookielawinfo-checkbox-non-necessary") == 'yes') {
    						window['ga-disable-'+CLI_MEASUREMENT_ID] = false;
    					}else {
    						window['ga-disable-'+CLI_MEASUREMENT_ID] = true;
    					}
    				}
    				jQuery('.cli_action_button').on('click', function(e){
    					e.preventDefault();
    					enable_or_disable_ga();
    				});
    			});
    		</script>
    	<?php
    	}
    }
Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Consent not changing and cookies not deleted’ is closed to new replies.