Skip to content

docs: instrument docs.seleniumboot.com with GoatCounter - #32

Merged
shossain786 merged 1 commit into
masterfrom
docs/goatcounter-analytics
Jul 22, 2026
Merged

docs: instrument docs.seleniumboot.com with GoatCounter#32
shossain786 merged 1 commit into
masterfrom
docs/goatcounter-analytics

Conversation

@shossain786

Copy link
Copy Markdown
Contributor

Closes P1-9.

Why

docs-site/docusaurus.config.js had no analytics of any kind — no scripts, no headTags, nothing. All 53 doc pages were invisible, so the entire quickstart funnel was unmeasured, and any CTA landing on docs (including the dev.to post's only link) recorded no referral.

This is more urgent than when it was filed: the live Show HN points at the GitHub repo, and the repo README's primary links go to docs.seleniumboot.com. Any traffic it sends lands on the one surface that records nothing.

What

Same GoatCounter account as seleniumboot.com — cookieless, no personal data, no consent banner needed.

One wrinkle worth calling out: docs and the marketing site report into a single GoatCounter site, so raw paths collide — the apex homepage and the docs homepage would both count as /, corrupting the homepage number that gets watched most. An inline settings script namespaces every docs hit under /docs-site/... so the two hostnames stay separable. Head-tag ordering guarantees it runs before count.js.

Verification

  • npm run build succeeds
  • All 54 generated HTML pages carry both the namespacing script and the count.js tag (53 docs + index)
  • Spot-checked a deep page (build/docs/getting-started.html) — correct endpoint attribute
  • Confirmed the minifier preserves the path function: window.goatcounter={path:function(t){return"/docs-site"+t}}

After merge

Deploys via the existing docs-site/** → GitHub Pages path. Worth confirming hits appear in GoatCounter under /docs-site/* once it's live.

🤖 Generated with Claude Code

The docs site had no analytics of any kind — no scripts, no headTags. All 53
doc pages were invisible, which meant the entire quickstart funnel was
unmeasured and any CTA landing on docs (including the dev.to post's only link)
recorded no referral at all.

Uses the same GoatCounter account as seleniumboot.com: cookieless, no personal
data, no consent banner needed.

Docs and the marketing site report into one GoatCounter site, so raw paths
would collide — the apex homepage and the docs homepage both count as "/". An
inline settings script namespaces every docs hit under "/docs-site/..." so the
two hostnames stay separable in the dashboard. It runs before count.js, which
the head tag ordering guarantees.

Verified: production build succeeds, and all 54 generated HTML pages carry both
the namespacing script and the count.js tag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shossain786
shossain786 merged commit 3fa9500 into master Jul 22, 2026
2 checks passed
@shossain786
shossain786 deleted the docs/goatcounter-analytics branch July 22, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant