Gtag Consent Mode Integration
Updated over a week ago

For customers who do not wish to use our Google Tag Manager template integration, consent mode integration can also be enabled via calls to the gtag function.

Add the following code to your HTML page, before the Enzuzo cookie banner in the page, and any other scripts.

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'personalization_storage': 'denied',
'functionality_storage': 'granted',
'security_storage': 'granted',
'wait_for_update': 500

window.__enzuzo = window.__enzuzo || {};
window.__enzuzo.consentMode = window.__enzuzo.consentMode || {}; window.__enzuzo.consentMode.gtagScriptVersion = 1;

This will activate the Enzuzo cookie banner's built-in gtag integration and enable consent mode for any Google services on your site.

Did this answer your question?