Connect Algolia search data to transactions

Hello,

I’m currently using an implementation of Algolia on an ecommerce site. We can see all the analytics on Algolia related to the queries made, but we would like to track search’s impact on transactions on our website. The problem we see is that something like Google Analytics has a difficult time tracking our implementation of instantsearch and autocomplete (because the results are instant and don’t actually load a page).

How would Algolia advise tracking this?

So far, we found this widget for instantsearch that allows us to send instantsearch specific analytics to GA but we are not sure if this will work. If it does, we’re not sure how to implement something similar for the autocomplete library.

Do any current Algolia customers have a similar experience?

Hi there,

We don’t have a widget for autocomplete.js that would do the same thing as the one you mentioned.
That does not mean that it is not doable, autocomplete.js does expose events that you can hook to.
Inside the handling of those events your can send the google analytics event with the data you want depending on your needs.

We’re finding that the exposed events are a little lacking. For example, there’s no way to track when queries are sent to Algolia. The closest thing to that is autocomplete:updated, which triggers when a dataset is rendered. Unfortunately, datasets are rendered when clicking into a search field, or clicking out of it, as well – which gives many false positives.