From 763fe8ad0575fba916b49ea7cab34ce75f66fb44 Mon Sep 17 00:00:00 2001 From: Mohammad Saddam Hossain Date: Wed, 22 Jul 2026 10:36:38 +0530 Subject: [PATCH] docs: instrument docs.seleniumboot.com with GoatCounter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- docs-site/docusaurus.config.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs-site/docusaurus.config.js b/docs-site/docusaurus.config.js index b5d7a64..d9ba5c3 100644 --- a/docs-site/docusaurus.config.js +++ b/docs-site/docusaurus.config.js @@ -18,6 +18,30 @@ const config = { onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', + // GoatCounter — cookieless, no personal data, no consent banner (same account as + // seleniumboot.com, see the site's /privacy page). + // + // 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 "/". The first + // script namespaces every docs hit under "/docs-site/..." so the two hostnames stay + // separable in the dashboard. Order matters — settings must run before count.js. + headTags: [ + { + tagName: 'script', + attributes: { type: 'text/javascript' }, + innerHTML: + "window.goatcounter={path:function(p){return '/docs-site'+p;}};", + }, + { + tagName: 'script', + attributes: { + async: 'true', + src: 'https://gc.zgo.at/count.js', + 'data-goatcounter': 'https://seleniumboot.goatcounter.com/count', + }, + }, + ], + i18n: { defaultLocale: 'en', locales: ['en'],