Skip to content

fix(analytics): measure completed catalog searches, not first keystrokes - #68

Merged
appdevelopsk merged 3 commits into
mainfrom
fix/catalog-search-intent-measurement-20261106
Nov 6, 2026
Merged

appdevelopsk merged 3 commits into
mainfrom
fix/catalog-search-intent-measurement-20261106

Conversation

@appdevelopsk

Copy link
Copy Markdown
Owner

The catalog emitted catalog_search_used on 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: checker 71a9d2926f2378926b645466c95d5d0b63317bed, tests 89205a7df44b38d03c9a3883b10fcf5720fb5b01. 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.

@appdevelopsk
appdevelopsk marked this pull request as ready for review November 6, 2026 10:36
@appdevelopsk
appdevelopsk merged commit 57a9aa8 into main Nov 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant