Add instrumentation script for pageview analytics#875
Merged
aaronpowell merged 4 commits intogithub:stagedfrom Mar 5, 2026
Merged
Add instrumentation script for pageview analytics#875aaronpowell merged 4 commits intogithub:stagedfrom
aaronpowell merged 4 commits intogithub:stagedfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client-side instrumentation to the Awesome Copilot Astro website to enable basic pageview analytics collection.
Changes:
- Injects a Hydro analytics collector endpoint via a
<meta name="ha-url">tag. - Loads GitHub’s
hydro-marketing.min.jsanalytics script on all pages viaBaseLayout.
aaronpowell
approved these changes
Mar 4, 2026
aaronpowell
requested changes
Mar 4, 2026
Contributor
aaronpowell
left a comment
There was a problem hiding this comment.
Probably worthwhile doing what is suggested by Copilot and have it only added when built for publishing to pages.
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>
…umentation-v2 # Conflicts: # website/src/layouts/BaseLayout.astro
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>
aaronpowell
approved these changes
Mar 5, 2026
Contributor
|
Sorry, I probably made your work a bunch harder when I did a huge overhaul of the site yesterday 😅 |
Contributor
Author
|
@aaronpowell No worries. Copilot CLI caught all the changes and helped me re-do it very quickly! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.Description
This PR adds a script for some basic page view analytics for the Awesome Copilot website.
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.