Skip to content

[codex] Add PostHog GTM analytics#181

Merged
blove merged 1 commit into
mainfrom
codex/posthog-gtm-analytics
May 2, 2026
Merged

[codex] Add PostHog GTM analytics#181
blove merged 1 commit into
mainfrom
codex/posthog-gtm-analytics

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 2, 2026

Summary

  • Add PostHog browser initialization and typed website analytics helpers.
  • Capture GTM interactions across nav, footer, docs, whitepaper, newsletter, and lead flows.
  • Add server-side conversion capture for lead, newsletter, and whitepaper API routes with PII-conscious properties.

Validation

  • npx vitest apps/website/src/lib/analytics/properties.spec.ts --run
  • npx nx build website
  • npx nx e2e website
  • git diff --check

Deployment Notes

  • GitHub repo values are configured for NEXT_PUBLIC_POSTHOG_HOST and NEXT_PUBLIC_POSTHOG_CAPTURE_LOCAL.
  • GitHub repo secret NEXT_PUBLIC_POSTHOG_TOKEN is configured.
  • Vercel production env still needs the same values, or the workflow needs to pass GitHub env into the Vercel build.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Building Building Preview, Comment May 2, 2026 5:07pm

Request Review

@blove blove merged commit d20eb8f into main May 2, 2026
11 of 12 checks passed
@blove blove deleted the codex/posthog-gtm-analytics branch May 7, 2026 16:30
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