Skip to content

fix(web): grant all consent-mode v2 signals on accept#17

Merged
Flyrell merged 1 commit into
mainfrom
fix/consent-mode-ad-signals
Jun 1, 2026
Merged

fix(web): grant all consent-mode v2 signals on accept#17
Flyrell merged 1 commit into
mainfrom
fix/consent-mode-ad-signals

Conversation

@Flyrell
Copy link
Copy Markdown
Owner

@Flyrell Flyrell commented Jun 1, 2026

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.html declares four signals as denied in its gtag('consent', 'default', ...) block:

  • analytics_storage
  • ad_storage
  • ad_user_data
  • ad_personalization

When a visitor clicked the banner's accept button ("Sure, track away"), loadGTM() in web/js/main.js issued a gtag('consent', 'update', ...) call that only granted analytics_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 update call now grants all four signals declared in the default block.

How to verify

  1. Clear localStorage for the site.
  2. Reload the page so the consent banner appears.
  3. Click the accept button ("Sure, track away").
  4. Inspect dataLayer and confirm a consent update entry 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

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>
@Flyrell Flyrell merged commit 53c9a9d into main Jun 1, 2026
2 checks passed
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