diff --git a/client/src/search.tsx b/client/src/search.tsx index 4f5209528ac3..d6c70d438846 100644 --- a/client/src/search.tsx +++ b/client/src/search.tsx @@ -245,7 +245,7 @@ function InnerSearchNavigateWidget(props: InnerSearchNavigateWidgetProps) { ); const resultClick: React.MouseEventHandler = () => { - gleanClick(quicksearchPing(inputValue)); + gleanClick(quicksearchPing(`${id} -> ${inputValue}`)); }; const { @@ -325,6 +325,8 @@ function InnerSearchNavigateWidget(props: InnerSearchNavigateWidgetProps) { ); }, [resultItems, inputValue]); + const [hasChanged, setHasChanged] = useState(false); + const searchResults = (() => { if (!isOpen || !inputValue.trim()) { return null; @@ -493,6 +495,10 @@ function InnerSearchNavigateWidget(props: InnerSearchNavigateWidgetProps) { onChange(event) { if (event.target instanceof HTMLInputElement) { onChangeInputValue(event.target.value); + if (!hasChanged) { + gleanClick(`quick-search-change: ${id}`); + setHasChanged(true); + } } }, ref: (input) => {