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

Add consent agreement status to events #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

silllli
Copy link

@silllli silllli commented Jun 5, 2024

This PR adds the agreed status (true or false) to both the component and window consent events. It enables to check whether consent was given or rejected. If a user changes their mind and updates their settings after their initial decision, it’s now possible to act accordingly (and disable analytics tools without reloading the page for example).

It implies a breaking change, since the events will now be fired agreed to or not. Existing code needs to be updated by adding a check for event.detail.agreed. Using the same event as before is more elegant than adding a completely new event with a different naming logic in my opinion (which would be necessary since the original event simply uses its consent type as name).

Closes #63

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 this pull request may close these issues.

Event to revoke consent
1 participant