GA4: Consent Mode signals, and ad_conversions for Google ads #41

Merged
jcoffey-dev merged 1 commits from feature/ga4-ad-conversions into main 2026-10-25 07:07:12 +00:00
Owner

GA4 now gets Google's consent signals (Consent Mode) when it starts after Accept. Without them, Google throws away what it learns from visitors in the EEA and the UK, even ones who said yes. Statistics are granted and ad personalization is always denied.

New analytics.ad_conversions: true (GA4 only, consent required) also measures the site's Google ads, for visitors who accept:

  • the banner says so ("including whether you came from one of its Google ads")
  • the privacy notice gets a line for it
  • check -csp adds Google's ad hosts
  • ad measurement is granted only then

It's refused with gated: false or with other providers. The editor's Privacy page has a checkbox for it and keeps it when saving. Docs: privacy.md.

Checked: gofmt, go vet, go test, and the editor-ui tsc, tests and build. A built starter site with ad_conversions was tried in Chrome: after Accept, dataLayer starts with consent default analytics/ad_storage/ad_user_data granted, ad_personalization denied.

GA4 now gets Google's consent signals (Consent Mode) when it starts after Accept. Without them, Google throws away what it learns from visitors in the EEA and the UK, even ones who said yes. Statistics are granted and ad personalization is always denied. New `analytics.ad_conversions: true` (GA4 only, consent required) also measures the site's Google ads, for visitors who accept: - the banner says so ("including whether you came from one of its Google ads") - the privacy notice gets a line for it - `check -csp` adds Google's ad hosts - ad measurement is granted only then It's refused with `gated: false` or with other providers. The editor's Privacy page has a checkbox for it and keeps it when saving. Docs: privacy.md. Checked: gofmt, go vet, go test, and the editor-ui tsc, tests and build. A built starter site with `ad_conversions` was tried in Chrome: after Accept, dataLayer starts with consent default analytics/ad_storage/ad_user_data granted, ad_personalization denied.
jcoffey-dev added 1 commit 2026-10-25 07:03:36 +00:00
GA4: Consent Mode signals, and ad_conversions for Google ads
ci / editor-ui (pull_request) Successful in 1m17s
ci / go (pull_request) Successful in 1m34s
93341da5a5
GA4 is told what the visitor agreed to when it starts: statistics granted,
ad personalization denied, ad measurement only with ad_conversions: true.
Without the signals Google drops what it learns from visitors in the EEA
and the UK.

ad_conversions (ga4, consent required) says so in the banner and the
privacy notice and adds Google ad hosts to the CSP. The editor offers it
and keeps it when saving.
jcoffey-dev merged commit adb5a7dcb6 into main 2026-10-25 07:07:12 +00:00
jcoffey-dev deleted branch feature/ga4-ad-conversions 2026-10-25 07:07:12 +00:00
Sign in to join this conversation.