Repository navigation
fix(analytics): measure completed catalog searches, not first keystrokes - #68
Merged
appdevelopsk merged 3 commits intoNov 6, 2026
Merged
Conversation
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.
The catalog emitted
catalog_search_usedon the very first input character, so GA4 recorded premature result counts and misleading length bands. Now update visible results immediately on input, but emit a privacy-preserving event when the user commits the query via Enter or leaves the search field. Avoid repeat events for the same normalized query and reset that guard on explicit empty-state reset. Raw search strings remain local and never enter event parameters. Added 3 negative tests: first-keystroke reporting, missing blur reporting, missing deduplication. 32/32 Python unittest tests executed and passed on files with Git blob SHA matching this branch: checker71a9d2926f2378926b645466c95d5d0b63317bed, tests89205a7df44b38d03c9a3883b10fcf5720fb5b01. Existing 92 store cards and 5 app-detail links unchanged. This changes GA4 event counting semantics; do not compare search_used counts across this release without annotation. No GitHub Actions, production deployment or verified growth lift.