Consent Change Event

Bronze Contributor
Bronze Contributor


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,


Consent Change Event

Employee Emeritus

Hi @FelixHartmann 

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
}, 100);

Hope that helps!

Consent Change Event

Tealium Employee

@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.


Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.