Amplitude: add granular explore_* events#639
Draft
hdprajwal wants to merge 1 commit into
Draft
Conversation
Contributor
Cloudflare Pages preview
|
conradarcturus
approved these changes
May 17, 2026
Issues & Enhancementsexplore_entity_switched
explore_view_switched
explore_sort_changed
explore_filter_changed
explore_search_typed
explore_detail_viewed
explore_detail_switched
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #638
Summary: Splits user interactions on
/dataout of the catch-allpage_viewedevent into seven dedicatedexplore_*events so they can be sliced cleanly in Amplitude.page_viewednow fires only on pathname change.Changes
useAmplitudeParamEventshook mounted inAmplitudeTracker(src/app/App.tsx).path/view/entitybase:explore_entity_switched,explore_view_switched,explore_sort_changed,explore_search_typed,explore_filter_changed(per-key, withfilter_action),explore_detail_viewed,explore_detail_switched. Full event taxonomy is in the linked issue.page_vieweddedupe insrc/shared/lib/amplitude.tsnow keyed on pathname only.data_exportedenriched with the samepath/view/entitybase for consistency. Breaking:object_typeis renamed toentityon this event.FILTER_PARAM_KEYS,deriveFilterAction,areFilterValuesEqualextracted inamplitudeFormat.ts;resolveEnumValueexported so numeric-enum filters emit readable strings.Test Plan
npm run dev, accept consent, open DevTools then Network and filter foramplitude.com./data. Confirm onepage_viewed.explore_detail_viewed), click a different card (explore_detail_switched), close the panel (no event)./data?searchString=Spanish&territoryFilter=ES&view=Table. Confirm onepage_viewedand zeroexplore_*events./data,/about,/data. Confirm onepage_viewedper route change, no spuriousexplore_*.No visual changes; screenshots not applicable.
Checklist
Summary
Fixes #638)Testing
npm run lintnpm run buildnpm run test(tests added for changed logic)npm run dev- manual walkthrough per the test plan above