fix: Google Tag Manager erst nach Einwilligung laden
GTM-Loader ist jetzt eine Funktion (ltLadeGtm), die consent.js nur bei „Alle akzeptieren“ bzw. gespeicherter Zustimmung aufruft. noscript-iframe entfernt, da er ohne Einwilligung Google kontaktiert hat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2ed49b3d95
commit
6ae031b3cb
31 files changed
+92
-210
No files matched your search
@@ -7,6 +7,8 @@
|
||||
var KEY = 'lt_consent_v1';
|
||||
|
||||
function update(granted) {
|
||||
// GTM erst nach Einwilligung laden – vorher keine Verbindung zu Google.
|
||||
if (granted && typeof window.ltLadeGtm === 'function') window.ltLadeGtm();
|
||||
if (typeof gtag !== 'function') return;
|
||||
var v = granted ? 'granted' : 'denied';
|
||||
gtag('consent', 'update', {
|
||||
|
||||
Reference in new issue
Block a user