-
Notifications
You must be signed in to change notification settings - Fork 91
Add Sprig survey tracking for feature flags page #2198
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Should be a quick one here, hope you can take a look Ryan. Thank you! |
hooks/useSprig.ts
Outdated
| }; | ||
|
|
||
| // Track if already on feature flags page | ||
| if (router.asPath.includes('/docs/featureflags')) { |
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.
seems like this could be merged with track experiment page view above
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.
I agree with Hans's comment to merge the page view tracking. Otherwise looks good to me
Added tracking event `viewed_featureflags_docs` that fires when users visit the `/docs/featureflags` page. This follows the same pattern as the existing experiments page tracking (`viewed_experimentation_docs`). - Uses shared debouncing logic to prevent duplicate events - Tracks both initial page loads and route changes - Includes proper error handling and null checks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Consolidated the experimentation and feature flags tracking into a single useEffect hook to eliminate code duplication. Both tracking events now share the same debouncing logic and route change handler. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
22e4ec1 to
5d1d0b3
Compare
Summary
viewed_featureflags_docsthat triggers when users visit/docs/featureflagsviewed_experimentation_docs)Implementation Details
viewed_featureflags_docs(follows naming pattern ofviewed_experimentation_docs)/docs/featureflagshooks/useSprig.ts:95-137Testing
Test Plan
/docs/featureflagsand verifyviewed_featureflags_docsevent fires in Sprig🤖 Generated with Claude Code