- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi,
is there an Event one could listen for, that is triggered every time the gdpr Object / Consent Setting is changed, i.e. every time utag.gdpr.setPreferencesValues or utag.gdpr.setConsentValue is called?
All the best,
Felix
We don't have any built-in functionality for that.
What you can try is to poll the cookie using setInterval. If you detect a change (or other reason) to the cookie clear the interval. eg:
var cookieChecker = setInterval(function(e) {
var mycookie = utag.loader.RC("mycookie");
if (mycookie == "false") {
// do something
clearInterval(cookieChecker);
}
}, 100);
Hope that helps!
@FelixHartmann This is a good idea. We could easily add a pub/sub feature, so that you can know when the cookie has been updated.
I would raise this in the product ideas.
Adrian
Copyright All Rights Reserved © 2008-2023