Skip to content

analytics: get product events live#230

Open
tin-computer[bot] wants to merge 3 commits into
mainfrom
codex/get-product-analytics-live
Open

analytics: get product events live#230
tin-computer[bot] wants to merge 3 commits into
mainfrom
codex/get-product-analytics-live

Conversation

@tin-computer

@tin-computer tin-computer Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • promote the readable product analytics instrumentation from dev onto the production branch without the rest of the review stack
  • send page views, install-command copies, and primary GitHub clicks to the Tin-managed PostHog project
  • use the public managed PostHog key only on the production host so previews and forks stay quiet unless explicitly configured

Verification

  • corepack pnpm lint
  • corepack pnpm source:build
  • corepack pnpm exec tsc --noEmit
  • PATH=/tmp/corepack-shims:/home/agent/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games corepack pnpm exec playwright test --config=playwright.config.ts tests/e2e/frontend.e2e.spec.ts -g "tracks homepage visits|exposes a working command copy control|tracks primary GitHub link clicks"

tin-computer Bot and others added 3 commits June 30, 2026 00:02
Co-authored-by: Ducksss <58126222+Ducksss@users.noreply.github.com>
Follow-up hardening for the managed PostHog integration (#203):

- Drop the hardcoded fallback project key so forks and unset
  environments no-op instead of phoning home to a baked-in project.
- Only send network events from production hostnames or localhost,
  so Vercel preview deploys never pollute the funnel even if the
  env var is scoped to all environments.
- Document NEXT_PUBLIC_POSTHOG_KEY / NEXT_PUBLIC_POSTHOG_HOST in
  .env.example.

In-page event recording (the e2e contract) is unchanged: events are
still pushed to window.__posthogEvents before any network guard.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@tin-computer tin-computer Bot requested a review from Ducksss as a code owner June 30, 2026 00:10
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
payload-components Ready Ready Preview, Comment Jun 30, 2026 12:11am
payload-components-97bf Ready Ready Preview, Comment Jun 30, 2026 12:11am

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