THIS IS ARCHIVED DOCUMENTATION

Coveo Analytics Events Are Not Logged in Sitecore 9.1 Analytics

Sitecore 9.1 Coveo for Sitecore 4.1 (May 2019)

Symptoms

You have a production environment Coveo-powered search interface that contains the Coveo Send Analytics to Sitecore component. Your search interface generates calls to the Sitecore Analytics endpoint, but no Coveo-related records are registered in your XDb database Interactions table.

Cause

The Coveo.Authentication.config file contains an improper site configuration patch sequence.

Resolution

The issue is resolved in the May 2019 release of Coveo for Sitecore 4.1. You have two options: apply the Coveo.Authentication.config file changes required to fix the issue or upgrade to the May 2019 release of Coveo for Sitecore 4.1.

To fix the issue without upgrading

In the Coveo.Authentication.config file, you need to move the <site name="coveoapi" element so that it becomes the first child of the <sites> element, as follows:

<sites>
  <!-- The site coveoapi needs to be inserted as the first element, or before any other sites that have the coveoapi site as a child (for example, sites defined with virtualpath="/coveo*"). -->
  <site patch:before="*[1]" name="coveoapi" virtualFolder="/coveo" physicalFolder="/coveo" enableTracking="false" content="master" domain="sitecore" set:loginPage="$(loginPath)shell/SitecoreIdentityServer">
    <patch:attribute role:require="ContentDelivery" name="content">web</patch:attribute>
  </site>
  <!-- The site coveorest needs to be inserted before any other sites that have the coveorest site as a child (for example, sites defined with virtualpath="/coveo/rest*"). -->
  <site patch:before="*[1]" name="coveorest" virtualFolder="/coveo/rest" physicalFolder="/coveo/rest" enableTracking="false" database="web" domain="extranet" />
  <!-- The site coveoanalytics needs to be inserted before coveorest, as it requires analytics to be enabled. -->
  <!-- The coveoanalytics website database attribute value should match the published website database attribute value to allow Coveo Usage Analytics logging. -->
  <site patch:before="*[1]" name="coveoanalytics" virtualFolder="/coveo/rest/v6/analytics" enableTracking="true" database="web" domain="extranet" />
  <site patch:before="*[1]" name="coveo_website" virtualFolder="/sitecore modules/Web/Coveo" physicalFolder="/sitecore modules/Web/Coveo" rootPath="/sitecore/content" startItem="/home" language="en" content="web" domain="sitecore" loginPage="/identity/login/admin/SitecoreIdentityServer" />
</sites>