sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

Add instrumentation metrics to Smart Search #45188

Open almeidapaulooliveira opened 1 year ago

almeidapaulooliveira commented 1 year ago

Related design issue:

Description

With Smart Search, we're curious if visitor behavior changes at all. Is retention better? Do we see a rise in searches? Is the correlation between searches and trial signups changing?

For this, we're fully instrumenting the Smart Search component. More context here.

Figma page with defined events: https://www.figma.com/file/GikUoxdCrRTmbQpiu72AUi/UX-for-%E2%80%99feeling-lucky%E2%80%99-search-mode.?node-id=3304%3A9738

almeidapaulooliveira commented 1 year ago

Cc: @taylorsperry

quinnkeast commented 1 year ago

It seems like our guidelines on naming events in Amplitude were lost at some point (@rrhyne or @ebrodymoore any idea what's up there)? Previously they were listed here, but I was able to find them in history.

TL;DR:

We use object action framework in Proper Case for our naming. For example, in eventLogger this would show up as 'SearchSubmitted', and in Amplitude it's converted to 'Search Submitted'.

Name space your event names so events in a group are easily recognized. For example: ClickedCTA follws the convension, but does not help users distinguish which CTA or where the event occurred. PostSignUpFlowCLickedBextCTA helps identify this CTA was for the browser extension.

Based on these guidelines, the event names defined here should be tweaked a bit like:

ClickedOnHideSmartSearchQueriesSmartSearchHideClicked ClickedOnSmartSearchQuerySmartSearchQueryClicked etc.

I'd also suggest changing ClickedOnSmartSearchDropdwon from "Dropdown" to "Toggle." The dropdown is what's presented, but it's a toggle button used as a trigger. So, that'd be ClickedOnSmartSearchDropdwonSmartSearchToggleClicked.

With these changes across the board, LGTM!

almeidapaulooliveira commented 1 year ago

Fixed. Thanks, Quinn.