Algolia Insights - no events in debugger

Hi there!
I’m having some issues with implementing Algolia Insights. I tried with InsightsMIddleware first but we got some errors (my guess is because of rendering), so we went with a custom hook solution.

A (unfinished) Demo of the implementation is here: algolia-lelo-demo (custom) - CodeSandbox

We are using a category page to display products, and sending a click event on opening a “Quick view” modal for a specific product.

Inside the Algolia chrome extension debugger, it is showing that click events are sent.
Also, inside the network tab on insights pings we are getting 200 OK responses:

Request URL:{APP_ID}&X-Algolia-API-Key={APP_KEY}&X-Algolia-Agent=insights-js%20(2.2.1)%3B%20insights-js-browser-umd%20(2.2.1)

eventName: "Open QuickView"
eventType: "click"
index: "local_variations"
objectIDs: ["entity:commerce_product_variation/1546:en"]
userToken: "GA124763944431668426866"

However, inside our debugger on{APP_ID}/events/debugger , the events are not showing up.

Do you know what could be the issue?

Hi @domagoj.peti

You may just need a little more hygiene on your events. Insights is particular on things like index name, object ID, and queryID matching up or it will drop the event.

For instance, I see you are using local_variations as the index name for your events (set in useAlgoliaEvent.ts), but the index name for you search UI is <InstantSearch searchClient={searchClient} indexName="demo_ecommerce">

Also, I notice you’ve hard coded the objectID as entity:commerce_product_variation/1546:en

Does that index and object exist within your application? Also, notice that since you aren’t sending the queryID with this event, which means it cannot be used to improve search results, only for personalization:

Note that unlike clickedObjectIDsAfterSearch, clickedObjectIDs doesn’t take a queryID . Therefore, clickedObjectID events only go towards personalization. clickedObjectIDsAfterSearch events go towards both personalization and Search Analytics

Finally, I notice you are overriding the InstantSearch Hits component with your own custom component. The typical pattern here is to wire your custom Hit object into the existing one with the useHits hook:

I don’t think that’s causing your event issue, but just thought I’d mention it as a best-practice.

Hi @chuck.meyer
Thank you for the feedback.

Yeah, I rushed a bit with this code sandbox as it is a fork of Algolia’s own example with some of our implementation files and hardcoded variables added for you to have context, I didn’t put too much effort into it :sweat_smile:

The index and object ID does exist in our application / on our indice, I didn’t want to put the app key and app ID here as it is a public forum.

It’s good to know about clickedObjectID, this was kind of confusing as we are using a facet filter to display products for a specific category, so I was not sure about queryID, will look into adding that as well.

Thanks again, and besides that, did you guys manage to figure out what could this issue be, could it be something from our side or some issue with the debugger itself?


I don’t have visibility into your account, so all I can provide is general guidance. If none of this helped, you might be best off opening a Support ticket and working with the support team to troubleshoot why your events aren’t being accepted.