This commit is contained in:
2026-04-28 00:24:15 +02:00
parent 95138003c6
commit 2114254518
3 changed files with 20 additions and 17 deletions

View File

@@ -26,27 +26,28 @@
});
var injectScripts = function injectScripts() {
// Example: Google Analytics
// Google Analytics consent
if (cookieNoticePro.isPreferenceAccepted("analytics") === true) {
//console.log("Analytics Scripts Running....");
gtag('consent', 'update', {
'analytics_storage': 'granted'
});
}
// Example: Google Adwords cookie, DoubleClick, Remarketing pixels, Social Media cookies
// Google Adwords, DoubleClick, Remarketing pixels, Social Media cookies
if (cookieNoticePro.isPreferenceAccepted("marketing") === true) {
gtag('consent', 'update', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted',
'personalization_storage': 'granted',
'security_storage': 'granted',
'functionality_storage': 'granted',
"wait_for_update": 2000
'ad_personalization': 'granted'
});
}
// Example: Remember password, language, etc
if (cookieNoticePro.isPreferenceAccepted("preferences") === true) {
//console.log("Preferences Scripts Running....");
gtag('consent', 'update', {
'personalization_storage': 'granted',
'security_storage': 'granted',
'functionality_storage': 'granted'
});
}
}
</script>