---
/**
* Side-by-side visitor analytics, each gated by env vars so this is a no-op until configured.
* Set the PUBLIC_* vars at build time (Dockerfile ARGs, fed by CI) to enable any of them.
* - Umami: PUBLIC_UMAMI_SRC (script URL), PUBLIC_UMAMI_WEBSITE_ID — self-hosted, cookieless
* - GA4: PUBLIC_GA_MEASUREMENT_ID (G-XXXXXXXXXX)
* - PostHog: PUBLIC_POSTHOG_KEY, PUBLIC_POSTHOG_HOST (default https://us.i.posthog.com)
* Umami and GA4 only fire on the production host, so staging/LAN/local visits are not counted.
* Anything enabled here must be disclosed on /privacy/.
*/
const posthogKey = import.meta.env.PUBLIC_POSTHOG_KEY;
const posthogHost = import.meta.env.PUBLIC_POSTHOG_HOST ?? "https://us.i.posthog.com";
const umamiSrc = import.meta.env.PUBLIC_UMAMI_SRC;
const umamiWebsiteId = import.meta.env.PUBLIC_UMAMI_WEBSITE_ID;
const gaId = import.meta.env.PUBLIC_GA_MEASUREMENT_ID;
const prodHost = new URL(import.meta.env.PUBLIC_SITE_URL ?? "https://www.bluecapstrategies.com").hostname;
---
{
posthogKey && (
)
}
{
umamiSrc && umamiWebsiteId && (
)
}
{
gaId && (
)
}