About search insight events

Hey, I am trying to sending algolia insight events in our custom app that using algolia search, I have a few questions:

  1. in the PLP page, it will send an empty query to get the results if users haven’t enter anything, in this case, do I need to send the events like product click/add to cart ?

  2. Product Viewed event, when should I send the event ? when the hits rendered in PLP ( regardless they have scrolled that far to actually see the product) or any other pages or only when user goes to the detail page ?

  3. PLP: Filter Clicked/Viewed, when I try to send the event, the format of the filters should be like [‘brand:apple’], but the app’s filter looks like [["brand.name: apple","brand.name: google"],["_tags: mobile","_tags: laptop"],"_tags: other"] this will cause an error when sending to algolia. For the click, I assume I should only include the filter that clicked not the entire facet filter, but what about the filter viewed ? I click a link which could include multiple filter like this example.


  1. Is this for category pages or are you simply displaying unfiltered results from the full index? If the results are unfiltered I don’t see a good reason to send an event until the user clicks a particular product.

  2. Product viewed events are for when the user arrives on a product detail page. This is more for when a user comes to the PDP from a method other than search (for instance a direct link from an advertisement)

  3. This is typically used for category pages. Remember these events are for tracking user preference, so make sure the filters you send in the event help you understand the users interests. For a complex filter like this, you’ll have to flatten your filter array for the event (["brand.name: apple","brand.name: google","_tags: mobile","_tags: laptop","_tags: other"]) . Think about how you want that category to reflect user behavior. I suspect having tags like "other" may make that challenging.

Thanks fo the answers

I am displaying unfiltered results before user enters query, I only send the click/conversion events when user clicks/adds to cart, but I have to attach the query id (which is empty query)

Now I understand. Those events will all aggregate under the empty search, which won’t help much for personalization, but can be very interesting for ranking analytics. You can certainly skip them, but first I’d check out this page if you haven’t already: How to remove the empty search from analytics | Algolia

thanks for sharing the document, I think it should be useful so I will keep it.