Skip to content

Conversation

@gakonst
Copy link
Contributor

@gakonst gakonst commented Feb 11, 2026

Summary

Re-implementation of #66 off latest main, following the current PostHog setup patterns.

Changes

  • Added posthog-node for server-side event capture
  • Created combined feedback adapter (src/lib/feedback-adapter.ts) that sends to both Slack and PostHog
  • Added feedback events and properties to src/lib/posthog.ts
  • Enabled session recording with password input masking in PostHogSetup.tsx
  • Updated vocs.config.ts to use the combined adapter

PostHog events

  • docs_feedback_submitted — all feedback submissions
  • docs_feedback_helpful — positive feedback
  • docs_feedback_not_helpful — negative feedback

Improvements over #66

  • Promise.allSettled + catch so PostHog failures can't break Slack/feedback UX
  • Safe URL parsing with try/catch fallback
  • Proper PostHog timestamp field (top-level, not in properties)
  • Follows main's current PostHog init pattern (defaults: '2025-11-30', no loaded callback)

Slack thread: https://tempoxyz.slack.com/archives/C0A87C21805/p1770824804971419

- Add posthog-node for server-side event capture
- Create combined feedback adapter (Slack + PostHog)
- Track docs_feedback_submitted, docs_feedback_helpful, docs_feedback_not_helpful events
- Include page URL, category, and message in event properties
- Enable session recording with password masking

Amp-Thread-ID: https://ampcode.com/threads/T-019c4d62-38c2-7005-bbd3-3ad64e139c61
Co-authored-by: Amp <amp@ampcode.com>
@gakonst gakonst requested a review from goksu February 11, 2026 15:54
@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
tempo-docs Ready Ready Preview, Comment Feb 11, 2026 3:56pm

Request Review

@goksu
Copy link
Member

goksu commented Feb 11, 2026

Closes #66

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.

2 participants