Gravatar for chris.ruderschmidt@americaneagle.com

Question by Chris Ruderschmidt, Sep 9, 2015 3:36 PM

When should Coveo Analytics be enabled via JS UI and through Sitecore?

We have custom JS UI results as well as a Coveo Search component in Sitecore. When should it be set up using HTML and when should it be set up through Sitecore? Or should it be both?

Thanks!

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Sep 9, 2015 4:07 PM

If your custom JS UI results code is also included in the search page and its initialization code is initializing the search page components, you don't need to configure the Coveo Usage Analytics in the Coveo Search component.

If both solutions are displayed on the search page but are initialized separately, you need to configure both.

Of course, if the 2 solutions are distinct and included in separate pages, you need to configure both.

Gravatar for chris.ruderschmidt@americaneagle.com

Comment by Chris Ruderschmidt, Sep 10, 2015 10:54 AM

Thanks!

Also, what does Origin1 mean? Where should that be directed to?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Sep 10, 2015 10:59 AM

https://onlinehelp.coveo.com/en/cloud/aboutusageanalytics_dimensions.htm

Origin 1 (Page/Hub) (formerly Search Hub)

The name of the search hub, a group of search interfaces, from which the events are performed.

Example: A company has a Customer Portals search hub regrouping all customer facing search interfaces and an Employee Portals search hub regrouping all search interfaces available to employees.

Gravatar for chris.ruderschmidt@americaneagle.com

Comment by Chris Ruderschmidt, Sep 10, 2015 12:33 PM

Not exactly quite what I'm looking for. Where would "Customer Portals" and "Employee Portals" be defined? is that in the SearchProvider.Config?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Sep 10, 2015 1:45 PM

This is handled automatically by Coveo for Sitecore if you enable Coveo Usage Analytics from a "Coveo Search" or "Coveo Search Box" component. The value set in Origin 1 is the name of the Sitecore site. The value set in Origin 2 is the name of the current page (the search page or the page with a "Coveo Search Box" component in it). The value set in Origin 3 is the full path of the current page. Those are set in the CoveoForSitecore.js file.

For your separate custom use of the JS UI, you could set the values to the same properties to be consistent.

Gravatar for chris.ruderschmidt@americaneagle.com

Comment by Chris Ruderschmidt, Sep 10, 2015 3:06 PM

Thanks for the detailed explanation!

Ask a question