Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event to revoke consent #63

Open
kratos-digital opened this issue Jan 17, 2024 · 3 comments · May be fixed by #67
Open

Event to revoke consent #63

kratos-digital opened this issue Jan 17, 2024 · 3 comments · May be fixed by #67

Comments

@kratos-digital
Copy link

Is there a way to dispatch an event when user clicks Reject button or Accept button when choice is inactive?
For example, user comes to website and clicks Accept. To make it simple we only have analytics. It will dispatch an event and using on:analytics={myCustomFunction} we can handle our analytics.

If user decides that he/she wants to revoke consent, but clicking Reject button, nothing happens. Also nothing happens if user clicks Accept when analytics is unchecked under settings. User should be able to revoke/remove cookies via cookie consent element. Yes, they can always clear cookies in browser, but most users aren't tech savvy and I think it's part of GDPR to enable user to revoke its consent.

@CptCrispyCrunchy
Copy link

CptCrispyCrunchy commented Jan 29, 2024

I'll second that. Especially as it is part of being GDPR-compliant (which is stated in the Readme). A simple true/false value representing the consent given attached to the custom event (like on:analytics) should suffice to easily run opt-out functions to revoke cookies.

An even neater solution would just notify on choice changes. When backwards-compatibility should be kept, a different custom event should better be dispatched, e.g. on:analytics-opt-out, so that all the opt-in code can be left untouched. Let me know if that solution is acceptable and I will create a PR.

I would appreciate this change very much!

Here is a simple proposal (I also changed the cookie settings close button to submit the changes directly):
commit

@antony
Copy link
Member

antony commented Feb 12, 2024

The way this is GDPR compliant is that you don't run any sort of non-gdpr compliant code until the user consents to those types of code, by clicking Accept. If they Reject or ignore, then you don't do anything.

That being said I'm not averse to events being run when the choices change. Feel free to open a PR and I will review.

@kratos-digital
Copy link
Author

Ok, I will create PR as soon as I can

@silllli silllli linked a pull request Jun 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants