Respond to user search events #5732
-
I'm setting up Plausible Analytics in our docs. I'd like to use their Events API to track search queries and results. Ideally, I'd log an event in Plausible at two points:
Has anyone done similar? I'm particularly stumped on the first one, as the user doesn't have to click anything to search (results appear as they type), so I'm not sure what I could hook into that signals they're done writing their query. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Search is your friend 😊
Material for MkDocs uses the mkdocs-material/src/partials/integrations/analytics/google.html Lines 42 to 49 in c2e5558 |
Beta Was this translation helpful? Give feedback.
Search is your friend 😊
Material for MkDocs uses the
blur
event to capture the semantics of "finished typing". Not perfect, but works reasonably well.mkdocs-material/src/partials/integrations/analytics/google.html
Lines 42 to 49 in c2e5558