klaro-org / klaro-js

Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.
https://klaro.org
Other
1.17k stars 249 forks source link

Fire one or a few tags withing ad_storage #466

Open Abathi opened 1 year ago

Abathi commented 1 year ago

I am applying Klaro on GTM to block third parties cookies, however I am only able to enable all of them or block all of them. Knowing that I added a JS variable to check the Klaro cookie then updating ad_storage to granted/denied. this is the variable logic: function(){ var cookie = {{klaro}} if(!cookie){return 'denied'} var json = JSON.parse(cookie) if(json["Facebook Ads"] && json["Facebook Pixel Ads"] && json["Twitter Ads"] && json["Tiktok Ads"] && json["RTB Ads"] && json["Line Ads"]){ return "granted"; } else { return "denied"; } } This means that "ad_storage" will be set to "granted" only if all conditions are met. And what if we need to fire only one of those tags? How should we do this? How to make fire only one or a few tags within that "ad_storage"?