diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 272692c..f48632d 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -128,9 +128,12 @@ export default defineConfig({ title: 'Nibiru', description: 'A modular MMVC PHP framework for rapid prototyping. Born among the old gods, built for modern builders.', - // Umami analytics — self-hosted, cookie-free, honours Do-Not-Track. - // No GDPR consent banner needed because no PII or cross-site state - // is captured. The script is only injected on production builds. + // Analytics — production-only. + // 1. Umami (self-hosted) — cookie-free, honours Do-Not-Track, + // no PII captured, no GDPR banner required. + // 2. Google Analytics 4 (gtag.js) — added for Search Console + // cross-linking + audience reach. Subject to GDPR; configure + // consent / IP-anonymisation in the GA property settings. head: import.meta.env.PROD ? [ { @@ -143,6 +146,21 @@ export default defineConfig({ 'data-exclude-search': 'true', }, }, + { + tag: 'script', + attrs: { + async: true, + src: 'https://www.googletagmanager.com/gtag/js?id=G-V8QWB45G6X', + }, + }, + { + tag: 'script', + content: + "window.dataLayer = window.dataLayer || [];\n" + + "function gtag(){dataLayer.push(arguments);}\n" + + "gtag('js', new Date());\n" + + "gtag('config', 'G-V8QWB45G6X');", + }, ] : [], logo: {