docsearch icon indicating copy to clipboard operation
docsearch copied to clipboard

Click and Conversion Analytics

Open oliviertassinari opened this issue 2 years ago • 3 comments

Describe the problem

Our team is diving into how we can improve the Algolia search results. Having the access to the clicks and how they change in an A/B test could guide us.

Describe the solution

We could implement https://www.algolia.com/doc/guides/getting-analytics/search-analytics/advanced-analytics/.

oliviertassinari avatar Sep 15 '21 09:09 oliviertassinari

Hey @oliviertassinari,

Search Insights are not supported by DocSearch yet. We are planning to support Autocomplete plugins before the v3 stable release, which would make this possible out of the box!

In the meantime, you might find useful informations on the analytics we provide on the dashboard?

shortcuts avatar Sep 15 '21 13:09 shortcuts

Search Insights are not supported by DocSearch yet. We are planning to support Autocomplete plugins before the v3 stable release, which would make this possible out of the box!

@shortcuts Is this now possible in v3? There doesn't appear to be a way to pass the insights plugin (created with createAlgoliaInsightsPlugin) to the autocomplete instance used by docsearch.

clowder avatar May 09 '22 10:05 clowder

Hi @shortcuts is there an estimate for support autocomplete plugins in DocSearchModal or DocSearch? Meanwhile, without out-of-box support, what's the best way to send analytics when I want to keep using DocSearchModal? Could you please point me to a guide or example of how to implement the analytics events with DocSearchModal? - Neither of the docsearch, autocomplete, or algolia docs is helpful in this case. Thank you!

p.s. I liked how convenient and flexible Algolia has been but it's been a big pain point (soon to be a deal breaker) that I can't manage to get click and conversion analytics.

yuhan avatar Jun 24 '22 07:06 yuhan

@shortcuts We're very interested in using click analytics with DocSearch as well. We need to be able to track the "No Clicks" rate in particular as we work on improving result quality.

Is it correct that this is still unsupported? I tried setting it up like this but am not seeing anything coming in on the Algolia side.

Seems like https://github.com/algolia/docsearch/issues/1688 is a similar question, but for Docusaurus.

Thank you!

sarahg avatar Dec 13 '22 19:12 sarahg

I guess the reason is that it requires additional computations, but DocSearch is free, so it's not profitable. Would be nice to have at least a very simple version: just a list of timestamped search queries, I believe this wont be very heavy (even getting through a REST api would be great).

C451 avatar Dec 17 '22 17:12 C451

(Hey there, sorry for the huge delay, provided more context here https://github.com/algolia/docsearch/issues/1734)

shortcuts avatar Dec 27 '22 12:12 shortcuts

For anyone who wants to do a custom DocSearch implementation or contribute to the project by adding the plugins feature, here's what to do:

expose Autocomplete's plugins API at the root of the DocSearch one, and forward it to our internal Autocomplete implementation, then importing the createAlgoliaInsightsPlugin plugin should make insights usable directly from DocSearch

shortcuts avatar Dec 27 '22 12:12 shortcuts

Hey @shortcuts,

I don't follow here your instruction on exposing the plugins API and forward the implementation and so on here 🤔

Can you provide the code for this? I suppose when you mean the root of the DocSearch, it is by swizzling SearchBar component from the @docusaurus/theme-search-algolia

YosephKS avatar Apr 17 '23 13:04 YosephKS

I see that the latest version of autocomplete-core (1.9.2) now has insight included by default: https://github.com/algolia/autocomplete/blob/next/packages/autocomplete-core/src/createAutocomplete.ts#LL72C24-L72C24

Could we update to 1.9.2 and enable insights by default?

KoenRijpstra avatar May 02 '23 14:05 KoenRijpstra

This has now been added with version 3.5.0. DocSearch now allows to pass in insights: true within the options params.

Also noted in the docs here.

Resolved by #1912

8bittitan avatar Jun 08 '23 16:06 8bittitan

@8bittitan

This has now been added with version 3.5.0. DocSearch now allows to pass in insights: true within the options params.

The example in the docs simply passes insights. Should that be fixed to your example of insights: true?

jfitzgerald avatar Jun 08 '23 17:06 jfitzgerald

@jfitzgerald yes, sorry about that will fix it! Good catch 😄

8bittitan avatar Jun 08 '23 17:06 8bittitan

Solved in #1904

oliviertassinari avatar Jun 29 '23 16:06 oliviertassinari