algolia/autocomplete

Algolia Insights Plugin - search-insight - "o is not a function" error

mertcildogan opened this issue · 8 comments

We are using jquery. All plugins and autocomplete are working correctly. I get an error when adding AUTOCOMPLETE-PLUGIN-ALGOLIA-INSIGHTS.

image
image
image

autocomplete works fine when deleted algoliaInsightsPlugin from plugins.

Could you reproduce this somewhere online so we can find what the root cause of this error is?

Oh, it's because you passed createAlgoliaInsightsPlugin({ aa }) instead of createAlgoliaInsightsPlugin({ insightsClient: aa })

Oh, it's because you passed createAlgoliaInsightsPlugin({ aa }) instead of createAlgoliaInsightsPlugin({ insightsClient: aa })

Thank you very much. Your technical team could not solve it for a long time.

Now I'm getting an error(422) like this. Could the reason be localhost?

image

image

Hm, with the incomplete URL, I'm not sure what could cause this. I'd recommend contacting support again for this issue, so they can escalate to the right team (not frontend experiences, but insights api)

Is there any more information in the response?

Is there any more information in the response?

I prepared a simple example. It just contains the suggestion & insights plugin.

https://codepen.io/mertcildogan/full/... (Deleted)

This fixed when I added "useCookie: true" parameter. Thank you very much again. :)

Ah yes, the userToken is indeed required, either via useCookie or passing it yourself.