From 954af58c20e9b49e5f48a5bb91b84283d4d12b87 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Tue, 5 May 2026 13:29:54 +0000 Subject: [PATCH] Add Google Analytics (GA4) tracking to all pages Add gtag.js with measurement ID G-NY61NRBJ68 to the Starlight head config for doc pages and directly to the landing page head. --- astro.config.mjs | 2 ++ src/pages/index.astro | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index 2d9adca..c1682bb 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -25,6 +25,8 @@ export default defineConfig({ Footer: './src/components/Footer.astro', }, head: [ + { tag: 'script', attrs: { async: true, src: 'https://www.googletagmanager.com/gtag/js?id=G-NY61NRBJ68' } }, + { tag: 'script', content: "window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-NY61NRBJ68');" }, { tag: 'link', attrs: { rel: 'preconnect', href: 'https://fonts.googleapis.com' } }, { tag: 'link', attrs: { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: true } }, { tag: 'link', attrs: { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap' } }, diff --git a/src/pages/index.astro b/src/pages/index.astro index e1f54e1..258768d 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -5,6 +5,11 @@ + + + + + Netclaw — Run your own agent.