From 27f1d103ead77fa52f32d6d01b38faa9619e21fc Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 7 Aug 2026 14:03:39 -0500 Subject: [PATCH] docs(website): add privacy-friendly analytics to the docs site GoatCounter via Starlight's `head` option, same site code as the marketing site so /docs traffic lands in one dashboard and referrer paths stay comparable. No cookies, no personal data, no consent banner, nothing to host. Answers the one question we cannot answer today: do the articles convert into documentation reads? Co-Authored-By: Claude Opus 5 (1M context) --- website/astro.config.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/astro.config.mjs b/website/astro.config.mjs index cc7dece..08a4657 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -7,6 +7,18 @@ export default defineConfig({ base: '/docs', integrations: [ starlight({ + // GoatCounter — same site code as the marketing site, so /docs traffic lands in + // the same dashboard and referrer paths stay comparable. + head: [ + { + tag: 'script', + attrs: { + 'data-goatcounter': 'https://greentea.goatcounter.com/count', + async: true, + src: '//gc.zgo.at/count.js', + }, + }, + ], // Let the content-backed 404.md own /404; otherwise Astro also injects a conflicting route. disable404Route: true, title: 'Green Tea.',