In order to provide GDPR compliant consent-first-analytics (and other stuff), you can use
Blocking execution of analytics script (until consent is given) can be done manually, but the problem is that analytics providers often provide minified code embeds that you have to include in your html as they are. If you want to exercise control over their execution, then you have to tamper with this minified JS yourself, which is complex and does not scale well if you load server 3rd party scripts.
Thus we invented
yett. Just drop in the script and define a domain blacklist –
yettwill take care of the rest ✨.
MutationObserver under the hood, thus is compatible with even IE11.
Beware though, as this might conflict with applications that rely heavily on
document.createElement (like React):
This library monkey patches
document.createElement. No way around this.