fix(web): grant all consent-mode v2 signals on accept#17
Merged
Conversation
The gtag('consent','default', ...) block in web/index.html declares four
signals as denied (analytics_storage, ad_storage, ad_user_data,
ad_personalization), but the accept handler's consent 'update' call only
lifted analytics_storage. The three ad signals therefore stayed denied
for every visitor who clicked accept, so Google's Consent Mode diagnostic
reported a 0% consent rate (100% of consent signals marked as denied).
The accept button ("Sure, track away") represents full consent, so the
update now grants all four signals declared in the default block.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The website's cookie consent banner accepted full tracking consent but only granted one of the four declared Consent Mode v2 signals. Google's Consent Mode diagnostic reported a 0% consent rate (100% of consent signals marked as denied).
Root cause
web/index.htmldeclares four signals as denied in itsgtag('consent', 'default', ...)block:analytics_storagead_storagead_user_dataad_personalizationWhen a visitor clicked the banner's accept button ("Sure, track away"),
loadGTM()inweb/js/main.jsissued agtag('consent', 'update', ...)call that only grantedanalytics_storage. The three ad signals were never lifted, so they stayed denied for every visitor — hence the 0% consent rate.Fix
The accept button represents full consent, so the
updatecall now grants all four signals declared in the default block.How to verify
localStoragefor the site.dataLayerand confirm aconsentupdateentry that grants all four signals (analytics_storage,ad_storage,ad_user_data,ad_personalization).Notes
Website-only change. No CLI or test impact, and CHANGELOG.md is intentionally not touched (it tracks CLI releases, not website fixes).
🤖 Generated with Claude Code