-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture documentation search analytics & improve legacy docs handling #534
Conversation
track posthog events on docs search & search click
|
I noticed an unwanted behavior:
docs-search.mp4 |
@mlejva this should be fixed now |
<div className="flex items-center gap-2 max-w-6xl mx-auto w-fit px-4 py-3 rounded-2xl bg-gradient-to-b from-zinc-800 to-zinc-900 text-zinc-400 ring-1 ring-inset ring-zinc-700"> | ||
<AlertCircle className="h-4 w-4 text-brand-400/80" /> | ||
<span> | ||
You are reading a <span className="text-brand-400/90">legacy</span>{' '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are reading a <span className="text-brand-400/90">legacy</span>{' '} | |
You are reading a <span className="text-brand-400/90">legacy (pre v1.0)</span>{' '} |
apps/web/src/components/Search.tsx
Outdated
function navigate({ itemUrl }: { itemUrl?: string }) { | ||
const captureSearchEvent = useDebounceCallback( | ||
(query: string, results_count: number) => | ||
posthog.capture('docs search', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We keep names of Posthog events in the past tense, e.g.: searched docs
apps/web/src/components/Search.tsx
Outdated
if (!itemUrl) { | ||
return | ||
} | ||
|
||
itemUrl = itemUrl.replace('(docs)/', '') | ||
|
||
posthog.capture('docs search result click', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We keep names of Posthog events in the past tense, e.g.: selected docs search result
This pr adds: