chore(site): wire Vercel Analytics into landing + Skill Hub pages#9
Merged
Conversation
The Starlight head-injection in astro.config.mjs only reaches Starlight doc pages, so the custom landing page (/) and Skill Hub (/skills, /skills/*) — including the highest-traffic page during the June viral spike — were collecting zero pageviews. Add the /_vercel/insights/script.js tag directly to the three standalone Astro page heads. Verified: 46/47 built pages now emit the script (only bg-test dev page excluded). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds Vercel Web Analytics tracking script to the 3 standalone Astro pages that don't go through Starlight:
site/src/pages/index.astro— landing pagesite/src/pages/skills/index.astro— Skill Hubsite/src/pages/skills/[slug].astro— per-skill detail pagesWhy
Starlight docs already emit the analytics tag via the
headconfig inastro.config.mjs, so/getting-started/*,/features/*,/guides/*,/api/*are covered. The 3 custom pages above weren't — so landing traffic (including recent viral spikes) went uncounted.After merge:
//skills/skills/<name>Verification
astro buildclean — 46/47 built pages now emit the script (onlybg-testdev page excluded intentionally).Deploy
cd site && npx vercel --prodafter merge.Scope
Site-only. No Python, no gitd changes. +6 lines total, all in 3 site pages.