How to send searchHub name from Coveo JS code
I need to send searchHub name from COVEO JS framework for specific reason. Currently we are using HTML text box and by clicking on it , i am getting the coveo response by using Cove JS.
Future , i want to replace with textbox by using Coveo OOB coveo search box in order to get the query suggestions.
Over all , i doesn't want to loose search event history which are used by HTML text box.
Switching to the OOTB Coveo Searchbox is not a huge task. You should do this right now instead of wondering how to set Analytics data properly from custom code.
The OOTB searchbox does not set anything. It uses an analytics client available on the component. The search hub is set on the CoveoAnalytics component and will be set properly on every events sent by the Coveo framework.
Or you can try Jeff's answer, but watch out since homemade code is more risky than using the seasoned code we provide OOTB.