docs: load the Cloudflare Web Analytics beacon - #796
Merged
Merged
Conversation
GitHub Pages serves the docs through a DNS-only CNAME, so Cloudflare does not proxy the traffic and cannot inject its beacon. Add the script through html_js_files. The token is that of the quantclimate.com Web Analytics site, which also accepts data from its subdomains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fagcMeo1LmLG2Dg3NybmQ
thomaspinder
enabled auto-merge (squash)
September 30, 2026 13:41
|
📖 Docs preview: https://pr-796--endearing-crepe-c2d5fe.netlify.app Smoke render — the expensive notebooks run with reduced budgets, so |
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
We have no traffic data for the docs at
gpjax.quantclimate.com. GitHub Pages serves the site through a DNS-only CNAME. Cloudflare does not proxy this traffic, so its automatic beacon injection does not reach the pages.Solution
docs/conf.pynow adds the Cloudflare Web Analytics beacon to each page throughhtml_js_files.quantclimate.comzone. Cloudflare matches the hostname by suffix, so that site also accepts data fromgpjax.quantclimate.com. No new site is necessary.type="module"anddata-cf-beacon).Verification
html_js_filesblock in a minimal project with the locked versions (Sphinx 9.0.4, shibuya 2026.7.12) andsphinx-build -W. The page contains this tag:After the merge
The suffix match comes from the Cloudflare Web Analytics FAQ. It is not yet tested for this site. After the docs deploy, make sure that page views for
gpjax.quantclimate.comshow in Web Analytics (filter by hostname).🤖 Generated with Claude Code
https://claude.ai/code/session_015fagcMeo1LmLG2Dg3NybmQ