From e3ee37a27450b16199ad4ccc08502c0d58feb6db Mon Sep 17 00:00:00 2001 From: MV Karan Date: Fri, 6 Mar 2026 02:30:52 +0530 Subject: [PATCH] Add instrumentation script for pageview analytics (#875) * Add instrumentation script for pageview analytics * Only include analytics tags in production builds Wrap hydro-marketing analytics meta tag and script in an import.meta.env.PROD conditional so they are excluded during local development and only rendered in production builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add production-only analytics tags to Starlight Head component Add hydro-marketing analytics meta tag and script to the custom Head.astro component override, gated behind import.meta.env.PROD so they only render in production builds (GitHub Pages deploy). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- website/src/components/Head.astro | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/website/src/components/Head.astro b/website/src/components/Head.astro index bf25df34..73dc360d 100644 --- a/website/src/components/Head.astro +++ b/website/src/components/Head.astro @@ -9,3 +9,16 @@ const basePath = import.meta.env.BASE_URL; document.body.dataset.basePath = basePath; }); +{import.meta.env.PROD && ( + <> + + + +)}