Coveo logClickEvent is not working in Custom ui
We have implemented custom UI to show most popular topics in our Lightning community.I need to register an custom event when user clicks on Topic in Popular Topic component.I am able to register event in Coveo using - logCustomEvent, but we want to register an event using logClickEvent. When I use logClickEvent all events are going - incoherent event section and with error code - CLICK_WITHOUT_ASSOCIATED_SEARCH.
I have looked into documentation and found out this error is due to incorrect search query uid.
I like to know
1. How do I fetch "query UID"
2.How do I attach query UID with logClickEvent.
Thanks in advance
Every time a search is performed, you are going to see a "searchUid" returned by the API.
You need to set this as the "searchQueryUid" property on the click event that you send to the usage analytics API, for this given query.
This ID will be different for each query performed.