From 7a7b79db88881c31040bf44de6e659cfdeb9eacd Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Thu, 31 Oct 2024 11:21:10 -0600 Subject: [PATCH] Add Analytics (#89) Add Google Analytics to docs. --- docs/.vitepress/config.mts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index a3f6bba9..820853ed 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -10,7 +10,23 @@ export default defineConfig({ ignoreDeadLinks: true, base: base, head: [ - ["link", { rel: "icon", href: "/favicon.png" }]], + ["link", { rel: "icon", href: "/favicon.png" }], + [ + "script", + { + async: "true", + src: 'https://www.googletagmanager.com/gtag/js?id=G-RKYWRJTV6J' + } + ], + [ + "script", + {}, + `window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'G-RKYWRJTV6J');` + ] + ], themeConfig: { editLink: { pattern: "https://github.com/astriaorg/docs/edit/main/docs/:path",