From 8c774cb245a0a07e2707013a3d647c6442155353 Mon Sep 17 00:00:00 2001 From: Neeldhara Misra Date: Mon, 6 Jul 2026 02:01:47 +0530 Subject: [PATCH] Add Rybbit analytics --- README.md | 5 +++++ src/layouts/SiteLayout.astro | 3 +++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 2e284a3..3e94077 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,8 @@ npm run build ``` The site is static and builds to `dist/`. + +## Analytics + +Production builds include Rybbit analytics through `https://analytics.neeldhara.cloud/`. +The site is registered as `events.neeldhara.com` in the `Websites` organization with site id `12`. diff --git a/src/layouts/SiteLayout.astro b/src/layouts/SiteLayout.astro index a136e73..39d7f55 100644 --- a/src/layouts/SiteLayout.astro +++ b/src/layouts/SiteLayout.astro @@ -44,6 +44,8 @@ const defaultNavItems: NavItem[] = [ const navItems = suppliedNavItems ?? defaultNavItems; const navVariant = suppliedNavItems ? "standard" : "toggle"; const pathname = Astro.url.pathname; +const rybbitScriptSrc = "https://analytics.neeldhara.cloud/api/script.js"; +const rybbitSiteId = "12"; const isMenu = (item: NavItem): item is Extract => "items" in item; const isCurrent = (href: string) => pathname === href; const getMenuGroups = (items: NavLink[]) => { @@ -90,6 +92,7 @@ const getMenuLayout = (item: Extract) => { {pageTitle} + {import.meta.env.PROD && }