Coveo For Sitecore Analytics

Coveo for Sitecore Specific Rendering The Coveo For Sitecore Analytics rendering implements the Coveo JavaScript Search Framework Analytics component to log user actions performed in a search interface and send them to the Coveo Usage Analytics service. The Coveo For Sitecore Analytics rendering also implements the Coveo for Sitecore-specific CoveoForSitecoreAnalytics component, responsible for logging custom metadata.

Usage Notes

  • Ensure you provide a meaningful Search Hub value in the data source (see Understanding the Search Hub).

  • Coveo usage analytics are only sent to the Coveo Usage Analytics service when viewing the published website. Actions performed when viewing site pages in the Experience Editor or in Preview Mode aren’t recorded in the Coveo Usage Analytics service.

Insertion Location

The Coveo For Sitecore Analytics rendering is an Allowed Control in the following placeholder(s): UI Header, Recommendations Components

Example insertion sequence for the Coveo For Sitecore Analytics rendering.

Coveo for Sitecore SXA rendering insertion locations aren’t limited by placeholder Allowed Controls. The Coveo For Sitecore Analytics rendering may be inserted anywhere within the Coveo Search Interface, whether in a Coveo for Sitecore or Sitecore placeholder.

Example insertion sequence for the Coveo For Sitecore Analytics rendering.

Data Source Options

Option name Description
Coveo Analytics REST endpoint The REST endpoint proxy to send usage analytics requests to (see endpoint component option)
Search Hub See Understanding the Search Hub
Coveo Usage Analytics custom metadata Key-value custom metadata pair(s) to log with the search interface events (see Add Custom Usage Analytics Metadata in Coveo for Sitecore)
Additional data attributes Allows use of Analytics component options not directly available in the data source (see Passing Non-Fronted JavaScript Framework Properties to Hive Components)

Sample Generated HTML and Corresponding Visual Output

You configure the Coveo for Sitecore Analytics data source as follows:

Data source configuration

Generated HTML:

<div class="CoveoForSitecoreAnalytics" 
data-sc-analytics-custom-metadata="{"metadatakey" : "metadatavalue"}">
  <div class="CoveoAnalytics" data-prebind-endpoint="coveoForSitecoreAnalyticsEndpoint" 
  data-prebind-anonymous="isAnonymous" data-prebind-search-hub="currentPageName" 
  data-search-hub="searchhubvalue" data-prebind-send-to-cloud="analyticsEnabled" 
  data-applied-prebind="true" data-endpoint="/coveo/rest/coveoanalytics" data-anonymous="true" 

Visit Events Recorded:

The following are sample visit events recorded in the Coveo Administration Console Visit Browser following a website visitor opening the search page, selecting a facet value and performing a search with the samsung keyword.

Analytics visit events

Recommended Articles