Zero clicks and conversion for using analyticsTags in search-insights

Hi,

We are unable to track Clicks and Conversions for our searches under custom analyticsTags. Though I could see my clicks and conversions as total in analytics view. But when we select the Filter in Analytics page, we see 0 clicks.

Requirement :
We have two Algolia search boxes on my page. Let’s say one for content search and the other for career search. So in the Analytics view, we wanted to see different slices for clicks and conversions for two boxes. So we decided to use different analyticsTags to differentiate between two searches.

Issue :
Clicks and Conversions are 0 for custom analyticsTags filter in Analytics view. But they appear as a whole without Filters.

Below is our configuration:

  1. using instant-search for search

      instantsearch.widgets.configure({
           clickAnalytics: true,
           analyticsTags: [
             "search_type:content-search",
      ],
    
      instantsearch.widgets.configure({
           clickAnalytics: true,
           analyticsTags: [
             "search_type:career-search",
      ],
    
  2. For Click firing

     instantsearch.connectors.connectInfiniteHits(
         (renderArgs, isFirstRender) => {
           const { hits, sendEvent } = renderArgs;
    
        container.addEventListener('click', (event) => {
           if (event.target.parentElement.matches('.hit-title')) {
    
             const hit = getClickedHit(event.target.parentElement);
    
             // Send Click event to Algolia Insights endpoint for Analytics
             sendEvent('click', hit, 'Search on Item');
    
           }
         }, false);
    
         container.querySelector('.search-results').innerHTML = `{hits.getHTML()}`
    

Open Question:

  1. Our ‘hit’ object for sendEvent has queryID and objectID, but it won’t have analyticsTags.
  2. How does the mapping happen when a click is received at the insight-server.
  3. Is there any additional configuration missing, I did not find details in the documentation on this.

Any guidance on how we proceed here.

i am stuck with the same problem, have you got the solution?

this started working after I mapped with the facet filter type instead of search_type to
analyticsTags: [type:${typeList.join('-').toLowerCase()}]
earlier it was analyticsTags: [search_type:${typeList.join('-').toLowerCase()}]