Skip to content

chore(site): wire Vercel Analytics into landing + Skill Hub pages#9

Merged
C-K-Loan merged 1 commit into
mainfrom
chore/analytics-live-pages-public
Jul 3, 2026
Merged

chore(site): wire Vercel Analytics into landing + Skill Hub pages#9
C-K-Loan merged 1 commit into
mainfrom
chore/analytics-live-pages-public

Conversation

@C-K-Loan

@C-K-Loan C-K-Loan commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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 page
  • site/src/pages/skills/index.astro — Skill Hub
  • site/src/pages/skills/[slug].astro — per-skill detail pages

Why

Starlight docs already emit the analytics tag via the head config in astro.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:

Page type Tracked?
Docs (Starlight) ✅ already
Landing / ✅ this PR
Skill Hub /skills ✅ this PR
Per-skill /skills/<name> ✅ this PR

Verification

astro build clean — 46/47 built pages now emit the script (only bg-test dev page excluded intentionally).

Deploy

cd site && npx vercel --prod after merge.

Scope

Site-only. No Python, no gitd changes. +6 lines total, all in 3 site pages.

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>
@C-K-Loan C-K-Loan merged commit 5766898 into main Jul 3, 2026
4 checks passed
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.

1 participant