• Resolved giantsoutsider

    (@giantsoutsider)


    Does this plugin give visitor the ability to revoke their decision to accept cookies? That is required by GDPR.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You are right, I think that this plugin was “perfect prior of the GDPR and it need some patches to be 100% GDPR compliant, I hope that this funcion will arrive in the short future, because this plugin has the big power to automatically lock many typf of plugins and htis is really great.

    Plugin Author webgrafia

    (@webgrafia)

    Done, in last release there’s a shortcode to use to revoke cookie acceptance!

    great! how it works? how the users can revoke the cookie acceptance?

    Works very well. Maybe another shortcut to delete *all* the cookies could be interestig. I’ve added a shortcode to do that. Really ugly… and I’m sorry but I’ve minified JS, but that is:

    function deleteAllCookies() {
    for (var e = document.cookie.split(“;”), o = 0; o < e.length; o++) {
    var i = e[o],
    n = i.indexOf(“=”),
    t = n > -1 ? i.substr(0, n) : i;
    document.cookie = t + “=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;domain=”, document.cookie = t + “=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;domain=” + location.hostname.replace(/^www\./i, “”)
    }
    }

    Simone.

    EDIT: this is the link of the snippet: https://stackoverflow.com/questions/50005303/delete-third-party-cookies-with-javascript

    • This reply was modified 6 years, 5 months ago by xxxsimoxxx.

    Hello @webgrafia,

    i tried the shortcode to reset the cookie preference but nothing happens. (Version 4.1.9)
    this is the the page the button is implemented on: https://www.campushelfer.de/de/datenschutzbestimmungen/

    The behavior i would expect is, that once i clicked on the button and the page is reloaded i get the cookie banner again and can choose again. Is this right?

    Thank you and best regards

    Simon

    • This reply was modified 6 years, 4 months ago by SimonNo.

    I found a way: find the reset-cookie.js file and add this:

    document.cookie = “ginger-cookie=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;”;

    right after the function delete_cookie(name, url) {

    (don’t delete anything, just add the string)

    Good luck ??

    Hey @nuovaera,

    thank you for your code! There was just a little error in it. You used the wrong tokens.
    That’s how the code is right and working:

    
    function delete_cookie(name, url) {
    	document.cookie = "ginger-cookie=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
        document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
        if(typeof url !== 'undefined'){
            window.location.href = url;
        }else{
            location.reload();
        }
    }
    

    EDIT: When reloading on the same page, the cookie banner didn’t appear all the time. For now i add a string to the reload url [ginger_reset_cookie text=”Reset der Cookie-Einstellungen ” redirect_url=”MYURL/datenschutzbestimmungen/?ginger-reload“]

    • This reply was modified 6 years, 4 months ago by SimonNo.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can you revoke cookie access?’ is closed to new replies.