feat(analytics): add cookieless Cloudflare Web Analytics beacon
Adds the Cloudflare Web Analytics beacon to every page (injected in GA_LINES alongside the GA tag). Cookieless and consent-free, so it counts all visitors regardless of the cookie banner — complements GA4, which only records consented sessions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
508cb79334
commit
616c48bc60
259 files changed
+518
No files matched your search
@@ -194,6 +194,8 @@ GA_LINES = [
|
||||
f" gtag('config', '{GA_ID}');",
|
||||
' </script>',
|
||||
' <script src="/consent.js" defer></script>',
|
||||
' <!-- Cloudflare Web Analytics (cookieless, no consent needed) -->',
|
||||
" <script type=\"module\" src=\"https://static.cloudflareinsights.com/beacon.min.js\" data-cf-beacon='{\"token\": \"eff2ed428ab3495eb9d4605234f226e8\"}'></script>",
|
||||
]
|
||||
|
||||
# ---- page trees (for hreflang parity) ----
|
||||
|
||||
Reference in new issue
Block a user