dryven / cookie-byte

Get full control over all your cookie-related settings right in the control panel: Create cookie categories, add code snippets, customise the cookie modal and activate cookie content covers that hide content as long as specific cookie categories are not accepted.
https://statamic.com/addons/dryven/cookie-byte
5 stars 2 forks source link

Modifying consent after initial grant #3

Closed Ceepster14 closed 3 years ago

Ceepster14 commented 3 years ago

Hi,

It's a GDPR requirement to allow users to modify their cookie permissions even after they have given an original consent. I can't see a built-in mechanism in this plug-in to do that i.e. re-display the modal and allow the user to change their settings? Is this correct?

I've tried implementing my own approach by detecting whether the essential cookie has been set and then providing a footer link which re-displays the consent modal. However, making a change in the modal is not reflected in the stored cookies i.e. removing permission for thirdparty cookies does not then change or remove the stored consent.

Can you recommend how this necessary functionality should be implemented using this plug-in?

Thanks

dryven-dano commented 3 years ago

Yes, you are absolutely right, so far subsequent changes have not been recognized. Erroneously, a consent was always given for all checked checkboxes, but the non-checked ones were simply ignored. I have now fixed this with the new release 1.0.7.

I don't know how you implemented the re-display of the cookie modal, just so you know: the method we foresaw for this is the show() method in the CookieModal object. I will definitely write a section in the documentation in the coming days about how to implement a this opt-out or change settings button.

On our customer's pages we did something like this:

cookie-byte.js

window.CookieModal = new CookieModal(window.CookieConsent);

_footer.antlers.html

<button onclick="window.CookieModal.show()">Customize cookie options</button>

As with the other issue, please close the issue once it has helped your problem, otherwise feel free to write again.

Ceepster14 commented 3 years ago

Hi,

Thanks for that. I'll pull the latest and give it a go.

Cheers

Ceepster14 commented 3 years ago

Fantastic - thanks for that, works a treat