You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Analytics: the content security policy blocks every Google Analytics hit #166
What. Google Analytics (#142) probably records nothing. On one page view of /pressure in production (v0.2.8, 8 Nov 2026), the browser blocked every hit that gtag.js sent. Only the gtag/js script loaded.
Request
Host
Blocked by
page_view (/g/collect)
analytics.google.com
connect-src
page_view retry (/g/collect)
www.google.com
connect-src
Google signals (/g/collect)
stats.g.doubleclick.net
connect-src
audiences pixel (/ads/ga-audiences)
www.google.com.au
img-src
No request went to *.google-analytics.com, which the policy does allow.
Why.
vite.config.ts allows https://*.google-analytics.com, https://*.analytics.google.com and https://*.googletagmanager.com in connect-src.
A *. wildcard needs at least one subdomain, so it doesn't match the bare host analytics.google.com.
With Google signals on, gtag also sends to www.google.com and *.g.doubleclick.net.
Fix, either:
add https://analytics.google.com, https://www.google.com and https://*.g.doubleclick.net to connect-src (Google's CSP guide for GA4 with signals also lists them for img-src; the country-specific ga-audiences pixel can stay blocked); or
turn off Google signals in the GA property, and check whether the hits then go to *.google-analytics.com.
Activity
Analytics: allow every host gtag sends GA4 hits to in the CSP (#166) (#…