Skip to content

Commit 43cdccc

Browse files
serpentbladeclaude
andcommitted
docs(analytics): add Cloudflare Web Analytics beacon
Cookieless, privacy-friendly pageview analytics via the JS beacon (the correct method for GitHub Pages — github.io isn't proxied through Cloudflare). The token is a public beacon token (lives in page source by design), keyed on the one-learning-community.github.io hostname — so the same snippet serves every org docs site; separate projects by page-path filter in the CF dashboard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3be955d commit 43cdccc

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ export default defineConfig({
3030
['meta', { property: 'og:image', content: 'https://one-learning-community.github.io/grease/og-image.png' }],
3131
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
3232
['meta', { name: 'twitter:image', content: 'https://one-learning-community.github.io/grease/og-image.png' }],
33+
// Cloudflare Web Analytics (public beacon token; cookieless). Keyed on the github.io
34+
// hostname, so the same token serves every One-Learning-Community docs site — filter by
35+
// page path (/grease/…) in the CF dashboard to separate projects.
36+
[
37+
'script',
38+
{
39+
defer: '',
40+
src: 'https://static.cloudflareinsights.com/beacon.min.js',
41+
'data-cf-beacon': '{"token": "b9e858dff0e743cf852f98b0b4a491a0"}',
42+
},
43+
],
3344
],
3445

3546
themeConfig: {

0 commit comments

Comments
 (0)