---
// Google Analytics + AdSense — only renders on the author's deploy
// (PUBLIC_TEMPLATE_HUB_URL is set in apps/showcase + per-template build envs
// at .github/workflows/pages.yml, never in cloning users' deploys). When the
// env var is blank, this component renders nothing — so cloning users don't
// accidentally fire Allan's GA property or load AdSense for his publisher ID.
const hub = import.meta.env.PUBLIC_TEMPLATE_HUB_URL;
if (!hub) return null;
---
<script is:inline async src="https://www.googletagmanager.com/gtag/js?id=G-DLRBEQ85ZN"></script>
<script is:inline>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-DLRBEQ85ZN');
</script>
<meta name="google-adsense-account" content="ca-pub-3474747237489350" />
<script is:inline async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3474747237489350" crossorigin="anonymous"></script>