Skip to content

Commit c4e7d45

Browse files
mmmavisramram-mf
andauthored
feat: add Civic Cookie Control banner to MozFest base template (#16182)
* feat: add Civic Cookie Control banner to legacy base template * feat: add Civic Cookie Control banner to MozFest base template * Remove redundant code Co-authored-by: Ram <ramon@mozillafoundation.org> * remove extra line --------- Co-authored-by: Ram <ramon@mozillafoundation.org>
1 parent c6557c4 commit c4e7d45

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

foundation_cms/legacy_apps/mozfest/templates/mozfest/mozfest-base.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@
1313
<!-- This GTM ID belongs to a Mozilla Festival container that is different from Mozilla Foundation GTM -->
1414
<meta name="gtm-identifier" content="GTM-5TFTDCX">
1515
<script nonce="{{ request.csp_nonce }}">window.dataLayer = window.dataLayer || [];</script>
16+
<script nonce="{{ request.csp_nonce }}">
17+
// Consent Mode v2: deny all by default before GTM loads.
18+
// Civic updates these via onAccept/onRevoke callbacks.
19+
// https://cookiecontrol.com/docs/v9/optional-categories#step-1-site-cleanup
20+
// https://developers.google.com/tag-platform/security/guides/consent
21+
function gtag(){dataLayer.push(arguments);}
22+
gtag("consent", "default", {
23+
"ad_storage": "denied",
24+
"analytics_storage": "denied",
25+
"ad_personalization": "denied",
26+
"ad_user_data": "denied"
27+
});
28+
</script>
1629
<script nonce="{{ request.csp_nonce }}">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
1730
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
1831
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

0 commit comments

Comments
 (0)