Hi all In a certain implementation for doc lookup,...
# community-help
s
Hi all In a certain implementation for doc lookup, we're using typesense. In this implementation, the query_by option in the query is based on the value selected in a dropdown. Suppose we want to track popularity of each query_by option using typesense analytics, what is the best way to go about it ? It doesn't look like the OOB analytics rule types can be used.
f
You could set up a counter rule and manually send an event through the API, when the search occurs (either
onBlur
on the Input element,
onChange
on the select element, pass it in the callback)
👍 1
s
I'll give it a shot.
f
s
Worked for me. Another question about this.... What is the ideal analytics flush interval ? what does it depend on ?
f
Since you're sending out events manually and using a counter rule, the flush interval here doesn't play a role. It has to do with auto-aggregation (popular queries/no-hit queries)