Add optional global gtag() exposure setting
New checkbox in General settings to conditionally expose window.gtag() for compatibility with third-party scripts (e.g. HFCM). Defaults to off, keeping only window.attCCGtag() available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,9 @@ var c=window.attCCConfig;
|
||||
window.dataLayer=window.dataLayer||[];
|
||||
function g(){window.dataLayer.push(arguments);}
|
||||
window.attCCGtag=g;
|
||||
<?php if ( ! empty( $s['expose_gtag_global'] ) ) : ?>
|
||||
window.gtag=g;
|
||||
<?php endif; ?>
|
||||
g('js',new Date());
|
||||
if(c.ads_data_redaction){g('set','ads_data_redaction',true);}
|
||||
if(c.url_passthrough){g('set','url_passthrough',true);}
|
||||
|
||||
Reference in New Issue
Block a user