Skip to content

Added tracking for Typesense to posthog#1155

Merged
justinegeffen merged 5 commits intomasterfrom
typesense-modules
Feb 26, 2026
Merged

Added tracking for Typesense to posthog#1155
justinegeffen merged 5 commits intomasterfrom
typesense-modules

Conversation

@justinegeffen
Copy link
Contributor

Added config for tracking search better.

@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for seqera-docs ready!

Name Link
🔨 Latest commit 8e0b2cd
🔍 Latest deploy log https://app.netlify.com/projects/seqera-docs/deploys/699e07f582724e00082a34db
😎 Deploy Preview https://deploy-preview-1155--seqera-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Docusaurus client-side module intended to send PostHog events for documentation search usage (query entered + result clicked), to improve Typesense search tracking.

Changes:

  • Added src/client-modules/posthog-search.js to listen for search input and search result clicks.
  • Debounced query tracking and captured metadata (query, clicked URL/title).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

justinegeffen and others added 4 commits February 24, 2026 20:15
Remove posthog-js import and use the globally available window.posthog instance from the existing PostHog snippet instead. This eliminates an unnecessary dependency and works with the site's existing PostHog setup.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add polling mechanism to wait up to 5 seconds for window.posthog to be available before initializing search event listeners. This fixes the timing issue where PostHog loads asynchronously and isn't available when the module first runs.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@justinegeffen justinegeffen merged commit 9c3829c into master Feb 26, 2026
8 checks passed
@justinegeffen justinegeffen deleted the typesense-modules branch February 26, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Editor review Needs a language review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants