News

Latest News, Updates, Tutorials and much more

You can allow visitors to change their mind (withdraw Cookie Policy consent if necessary) on any page. This can be done with a checkbox or link/button. Main difference in their behavior is that: 

checkbox - actually changes user consent when clicked.

button / link - only displays cookie policy popup, user has to click button in popup to change his choice.

 

Adding checkbox

All you need to do is place a checkbox with ID csconsentcheckbox in any place of your website, for example on Privacy Policy page after Cookie Policy section.

Here is an example of code:

<input id="csconsentcheckbox" type="checkbox">I agree with Cookie Policy

Another example with label text being clickable:

<input id="csconsentcheckbox" type="checkbox"><label for="csconsentcheckbox">I agree with Cookie Policy</label>

You are free to change text and style it as you want. Just make sure it's a checkbox and it has a proper ID attribute.

Checking/Unchecking this box is the same as clicking I agree / I disagree button. If user already agreed to Cookie Policy, this checkbox will be automatically checked. In fact, if you click I agree / I disagree buttons on the same page, checkbox will automatically check/uncheck. If visitor didn't make a choice yet, checkbox will be unchecked.

You can test if this works properly by clicking this checkbox while cookie policy popup is visible: it should disappear like when clicking I agree button

Note: This functionality was introduced on 2018-05-05, so to enable it for a Cookie-Script item created before that date you have to click Update all items button in the list of items.

 

Adding button / link

As with checkbox, you have to assign ID attribute csconsentlink to any element, clicking which will open popup. It can be any element: button, link, image, etc. Some examples: 
 
<a href="javascript:void()" id="csconsentlink">Cookie Settings</a>
<button id="csconsentlink">Cookie Settings</button>
<span id="csconsentlink">Cookie Settings</span>
Note: This functionality was introduced on 2018-05-18, so you need to Update all items created before that date.