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

Change consent with javascript (e.g. for custom category) #57

Open
v1nk0 opened this issue Jul 31, 2024 · 0 comments
Open

Change consent with javascript (e.g. for custom category) #57

v1nk0 opened this issue Jul 31, 2024 · 0 comments

Comments

@v1nk0
Copy link

v1nk0 commented Jul 31, 2024

Is there a way to set consent for a certain category through JavaScript?
I only found a acceptAllCookies and acceptEssentialsCookies.
So that allows to either accept all, or only the predefined "essentials" group.

Let's say I created a custom group called 'custom'.
How would I make a button that sets consent for this group? (and subsequently fires any scripts defined for this group)

something like:
window.LaravelCookieConsent.accept('custom');

@v1nk0 v1nk0 changed the title Change consent with javascript Change consent with javascript (e.g. for custom category) Jul 31, 2024
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

No branches or pull requests

1 participant