Skip to content

Add instrumentation script for pageview analytics#875

Merged
aaronpowell merged 4 commits intogithub:stagedfrom
mvkaran:mvkaran/add-instrumentation-v2
Mar 5, 2026
Merged

Add instrumentation script for pageview analytics#875
aaronpowell merged 4 commits intogithub:stagedfrom
mvkaran:mvkaran/add-instrumentation-v2

Conversation

@mvkaran
Copy link
Copy Markdown
Contributor

@mvkaran mvkaran commented Mar 4, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description

This PR adds a script for some basic page view analytics for the Awesome Copilot website.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify): Website update

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.

@mvkaran mvkaran requested a review from aaronpowell as a code owner March 4, 2026 17:13
Copilot AI review requested due to automatic review settings March 4, 2026 17:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js analytics script on all pages via BaseLayout.

Comment thread website/src/layouts/BaseLayout.astro Outdated
Comment thread website/src/layouts/BaseLayout.astro Outdated
Comment thread website/src/layouts/BaseLayout.astro Outdated
Copy link
Copy Markdown
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worthwhile doing what is suggested by Copilot and have it only added when built for publishing to pages.

mvkaran and others added 3 commits March 5, 2026 22:24
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>
@mvkaran mvkaran requested a review from Copilot March 5, 2026 18:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mvkaran mvkaran requested review from aaronpowell and Copilot March 5, 2026 18:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@aaronpowell
Copy link
Copy Markdown
Contributor

Sorry, I probably made your work a bunch harder when I did a huge overhaul of the site yesterday 😅

@aaronpowell aaronpowell merged commit e3ee37a into github:staged Mar 5, 2026
2 checks passed
@mvkaran
Copy link
Copy Markdown
Contributor Author

mvkaran commented Mar 6, 2026

@aaronpowell No worries. Copilot CLI caught all the changes and helped me re-do it very quickly! :copilot:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants