Skip to content

GTM consent mode#955

Draft
maureenlholland wants to merge 1 commit intomainfrom
wt-602--consent-management
Draft

GTM consent mode#955
maureenlholland wants to merge 1 commit intomainfrom
wt-602--consent-management

Conversation

@maureenlholland
Copy link
Collaborator

@maureenlholland maureenlholland commented Feb 4, 2026

One-line summary

GTM implementation of Google consent mode: https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#tag-manager_2

Denial is default. Updates only run with user-driven consent pref (set by marketing opt-out checkbox, consent banner or cookie page)

on /landing/get, we allow analytics by default

Significant changes and points to review

Issue / Bugzilla link

https://mozilla-hub.atlassian.net/browse/WT-602

Testing

  • GTM is loaded according to usual gates (respecting DNT/GPC, consent-required, analytics cookie)

When GTM is loaded on most pages:

  • and there is no existing analytics cookie, defaults are denied
  • and there is an existing analytics cookie TRUE, defaults are granted

When GTM is loaded on /landing/get

  • and there is no existing analytics cookie, analytics default is granted, ad defaults are denied
Screenshot 2026-02-11 at 6 49 17 PM

When user indicates pref, an 'update' dataLayer event appears:

Screenshot 2026-02-11 at 6 50 19 PM

Google verification docs: https://developers.google.com/tag-platform/security/guides/consent-debugging#start-debugging

@maureenlholland maureenlholland force-pushed the wt-602--consent-management branch from b333a17 to 31fb40b Compare February 11, 2026 11:49
@maureenlholland maureenlholland changed the title wip GTM consent mode Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.56%. Comparing base (b9940cf) to head (6e88cec).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #955      +/-   ##
==========================================
- Coverage   81.42%   78.56%   -2.87%     
==========================================
  Files         119      121       +2     
  Lines        6574     6881     +307     
==========================================
+ Hits         5353     5406      +53     
- Misses       1221     1475     +254     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maureenlholland maureenlholland force-pushed the wt-602--consent-management branch 2 times, most recently from b00bf89 to b9a66c5 Compare February 11, 2026 18:53
@maureenlholland maureenlholland force-pushed the wt-602--consent-management branch from b9a66c5 to 6e88cec Compare February 11, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant