add back in docs query endpoint trackling lost with fuma docs#2748
add back in docs query endpoint trackling lost with fuma docs#2748annabellscha wants to merge 2 commits intomainfrom
Conversation
annabellscha
commented
Mar 30, 2026
- Was removed after migration to fuma docs, adding back in
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review |
There was a problem hiding this comment.
LGTM — straightforward restoration of PostHog tracking with proper error handling and non-blocking .
Extended reasoning...
Overview
Single file change to that restores PostHog analytics tracking that was lost during a migration to fuma docs. Adds PostHog client initialization and a -wrapped tracking call in the GET handler.
Security risks
None significant. The PostHog key is read from an environment variable and the client is only instantiated when the key is present. The tracked data is the user's search query, which is already being processed by the endpoint. CORS headers are unchanged. No auth or permission logic is touched.
Level of scrutiny
Low. This is a docs site analytics endpoint — not production-critical business logic. The pattern (conditional PostHog init + + try/catch) is standard and well-understood.
Other factors
No bugs found. Deployment already showing Ready on Vercel preview. Change is small, self-contained, and follows established patterns in the codebase.