Skip to content

Commit 44ed4a0

Browse files
serpentbladeclaude
andcommitted
docs: add Cloudflare Web Analytics beacon to VitePress site
GitHub reports repo traffic but not deployed-docs-site visits. Inject the cookieless Cloudflare Web Analytics beacon via a VitePress head script. The data-cf-beacon token is a public client-side identifier. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c52474f commit 44ed4a0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ export default defineConfig({
2929
base: '/rozie.js/',
3030
cleanUrls: true,
3131
lastUpdated: true,
32+
// Cloudflare Web Analytics — privacy-friendly, cookieless page metrics for the
33+
// deployed docs site (GitHub only reports repo traffic, not site visits).
34+
// The beacon token is a public client-side identifier, safe to commit.
35+
head: [
36+
[
37+
'script',
38+
{
39+
defer: '',
40+
src: 'https://static.cloudflareinsights.com/beacon.min.js',
41+
'data-cf-beacon': '{"token": "b9e858dff0e743cf852f98b0b4a491a0"}',
42+
},
43+
],
44+
],
3245
// Contributor/maintainer guides that live under docs/ but are NOT site pages
3346
// (they contain bare <slug>/<Name> tokens the VitePress Vue compiler would try
3447
// to parse as unclosed elements). Keep them co-located but out of the build.

0 commit comments

Comments
 (0)