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

Only load widget when consent has been given #20

Open
BramEsposito opened this issue Nov 24, 2021 · 0 comments
Open

Only load widget when consent has been given #20

BramEsposito opened this issue Nov 24, 2021 · 0 comments

Comments

@BramEsposito
Copy link

The Tawk.to Widget should not be loaded when the user has not given consent.

Most Cookie Consent banners provide a global javascript object that contains the consent and on what level consent has been given.

Multiple approaches are possible:

  • set the javascript variable in the admin UI and check for it in the widget code
  • pass the widget javascript to apply_filters so it can be wrapped in a javascript check
  • let the widget template be overruled with a customised version by using locate_template

This last one would be my preferred approach

I'll try and create a Pull request anytime soon

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