mirror of
https://github.com/github/awesome-copilot.git
synced 2026-03-12 04:05:12 +00:00
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>
This commit is contained in:
@@ -9,3 +9,16 @@ const basePath = import.meta.env.BASE_URL;
|
||||
document.body.dataset.basePath = basePath;
|
||||
});
|
||||
</script>
|
||||
{import.meta.env.PROD && (
|
||||
<>
|
||||
<meta
|
||||
name="ha-url"
|
||||
content="https://collector.githubapp.com/awesome-copilot-web/collect"
|
||||
/>
|
||||
<script
|
||||
async
|
||||
defer
|
||||
src="https://analytics.githubassets.com/hydro-marketing.min.js"
|
||||
></script>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user