Skip to content

Commit

Permalink
Added consent mode banner
Browse files Browse the repository at this point in the history
  • Loading branch information
sohail-aspose committed Nov 8, 2024
1 parent 2239918 commit 31dd056
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion themes/about_common_theme/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,36 @@
}
}
</style>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZHJP7PJ5MD"></script>
<script>
// Consent Management (must be done before tracking starts)
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'
});

gtag('set', 'url_passthrough', true);
gtag('set', 'ads_data_redaction', true);

// Initialize Google Analytics (after consent setup)
gtag('js', new Date());

gtag('config', 'G-ZHJP7PJ5MD');
</script>
<!-- UET Consent Settings (specific to Microsoft Advertising) -->
<script>
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
'ad_storage': 'denied'
});
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cms.admin.containerize.com/templates/aspose/js/bootstrap.js" type="text/javascript"></script>
<script src="https://cms.admin.containerize.com/templates/aspose/js//highlight.site.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>hljs.initHighlightingOnLoad();</script>

0 comments on commit 31dd056

Please sign in to comment.