Skip to content

feat: add analytics, visitor counter, support ribbon, and GitHub stars#22

Merged
anurag629 merged 3 commits intocodercops:devfrom
anurag629:dev
Mar 9, 2026
Merged

feat: add analytics, visitor counter, support ribbon, and GitHub stars#22
anurag629 merged 3 commits intocodercops:devfrom
anurag629:dev

Conversation

@anurag629
Copy link
Member

@anurag629 anurag629 commented Mar 9, 2026

Summary

  • Site URL fix — updated from chatcops.codercops.com to chat.codercops.com
  • Google Analytics (G-GLYL9J6QYX) on landing page and all Starlight docs pages
  • Visitor counter — Upstash Redis powered today/total counts in footer (session-based dedup, shared Redis instance with ogcops)
  • Support ribbon — diagonal corner tape in top-right with Buy Me a Coffee and PayPal dropdown
  • GitHub star count — live count in Hero "Star on GitHub" button and Header nav (cached 1hr in sessionStorage)
  • Inline widget scroll fixpanel.show() no longer auto-focuses textarea in inline mode
  • Docs — added website development section to CONTRIBUTING.md with env var setup

Changes

File What
website/astro.config.mjs Site URL fix, GA in Starlight head
website/src/layouts/Landing.astro GA script, GitHub stars fetch
website/src/lib/upstash.ts New — Upstash Redis client
website/src/pages/api/visitors.ts New/api/visitors GET/POST endpoint
website/src/components/landing/Footer.astro Visitor counter UI + script
website/src/components/landing/SupportBanner.astro New — Corner ribbon
website/src/pages/index.astro Import SupportBanner
website/src/components/landing/Hero.astro Star count badge
website/src/components/landing/Header.astro GitHub icon + star count
packages/widget/src/dom/panel.ts Skip focus for inline panels
CONTRIBUTING.md Website dev setup + env vars docs

Env vars needed in Vercel

  • UPSTASH_REDIS_REST_URL — Upstash Redis REST endpoint
  • UPSTASH_REDIS_REST_TOKEN — Upstash Redis auth token

Test plan

  • Landing page loads without auto-scrolling to inline chat
  • GA fires in Network tab
  • Visitor counter shows today/total in footer
  • Support ribbon visible top-right, dropdown opens on click
  • GitHub star count appears in Hero button and Header
  • Starlight docs pages include GA
  • pnpm -r build succeeds

…ub stars

- Add Google Analytics (G-GLYL9J6QYX) to landing layout and Starlight docs
- Add Upstash Redis visitor counter (today/total) in footer with session dedup
- Add /api/visitors endpoint (GET/POST) with shared Upstash instance
- Add diagonal corner ribbon with Buy Me a Coffee and PayPal support links
- Add live GitHub star count to Hero button and Header nav
- Fix inline widget auto-scroll by skipping input focus in inline mode
@vercel
Copy link

vercel bot commented Mar 9, 2026

@anurag629 is attempting to deploy a commit to the CODERCOPS Team on Vercel.

A member of the Team first needs to authorize it.

@anurag629 anurag629 merged commit a92188a into codercops:dev Mar 9, 2026
1 of 2 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