Possible functionality

147 views
Skip to first unread message

james hofton

unread,
Jun 7, 2018, 12:03:51 PM6/7/18
to Cookie Control Support
HI There,  

I really like the Wordpress plugin, but i have a few queries from clients ( i have 19 people using this so far).   When i first brought the plugin, the initial state would have google analytics turned on and the slide out menu would not show.   Users could click on the cog and turn it off if they wanted.   But since then, the coding has updated and they must accept before the Google analytics is turned on.   Can i get the old functionality back?   

Thanks in advance

James


james hofton

unread,
Jun 12, 2018, 9:02:18 AM6/12/18
to Cookie Control Support
Can someone come back to me on this please

Gerasimos Tzoganis

unread,
Jun 12, 2018, 9:30:59 AM6/12/18
to Cookie Control Support
Hi James,

Indeed we have changed this functionality because it was not GDPR compliant. It is necessary to ask for explicit user consent before placing any cookies as you can read on ICO's pages:
https://ico.org.uk/for-organisations/guide-to-pecr/what-are-pecr/#gdpr

So we removed this functionality and added the generic "Accept" buttons, to which the user can click on and turn on all the categories for which you have initialConsentState set to "on". We chose this as a compromise as you are gaining explicit user consent but don't really require your users to read through and toggle all categories on one by one.

If however despite the above you think you can have categories on by default (which again we think is not GDPR compliant), you could achieve that programmatically, by forcibly toggling the categories on via Cookie Control's API. So for instance, if you have a cookie category called "analytics", which you want on by default, you can do the following:

1. Take a note when the user explicitly revokes a category, by putting this on your onRevoke function:
localStorage.setItem("analyticsRevoked", "true");

2. Remove this from your local storage when/if the user consents again. So put this in your onAccept:
localStorage.removeItem("analyticsRevoked");

3. After the widget loads, wait for a couple of seconds for it to finish rendering and then toggle the category on, if the user has taken no action in the past:
setTimeout(

 
function() {
   
if (localStorage.getItem("analyticsRevoked") == null && CookieControl.getCookie('analytics') != "accepted") {
     
CookieControl.toggleCategory(0); // Assuming analytics is your first category in optional Cookies.
   
}

 
}, 2000
);


Since you are using the WP plugin, you could put this code either at the end of your theme or in your functions.php as described here.

I hope this helps. But please note that we don't really advise turning cookie categories on by default.

Kind regards,
Gerasimos

james hofton

unread,
Jun 12, 2018, 9:33:49 AM6/12/18
to Cookie Control Support
Thanks for the reply, its appreciated, i know its not correct, but its what they want.  
Reply all
Reply to author
Forward
0 new messages