Skip to content

feat(site): Cloudflare Web Analytics beacon + CSP allowance - #283

Merged
iamfatness merged 1 commit into
mainfrom
feat/web-analytics-beacon
Oct 27, 2026
Merged

iamfatness merged 1 commit into
mainfrom
feat/web-analytics-beacon

Conversation

@iamfatness

Copy link
Copy Markdown
Owner

The zone's Web Analytics auto-install never worked: the worker CSP (script-src 'self' + jsdelivr, connect-src 'self') blocked the injected beacon, so the dashboard was empty.

  • build-site.mjs emits the beacon in the shared layout and docs head (13 public pages; the unlisted /reviews pages are left out).
  • site-worker.js CSP allows static.cloudflareinsights.com (script) and cloudflareinsights.com (connect).
  • Verified locally: build passes the inline-script guard; beacon present on all 13 public pages.
  • Cookieless; no consent banner needed, but consider a line in /privacy/.
  • Not verified live: needs a Deploy Site run, then a screenshot/network check on the live page (CSP is prod-only).

🤖 Generated with Claude Code

The zone's auto-install never reached the pages: site-worker.js CSP is
script-src 'self' + jsdelivr and connect-src 'self', so the injected beacon
was blocked and the Web Analytics dashboard stayed empty. Emit the tag from
build-site.mjs (shared layout + docs head; not the unlisted /reviews pages)
and allow static.cloudflareinsights.com / cloudflareinsights.com.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@iamfatness
iamfatness merged commit ab845a3 into main Oct 27, 2026
12 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