Coveo for Sitecore Analytics
Coveo for Sitecore Analytics
Coveo will deprecate v1 endpoints on June 3, 2025. Visit usageanalytics.coveo.com endpoint deprecation to determine if this change affects you and, if necessary, learn how to update your Coveo for Sitecore configuration. |
Legacy feature
This article pertains to the Coveo Hive framework which is now in maintenance mode. Choose one of Coveo’s more modern, lightweight, and responsive libraries for any future search interface development. See the search interface Implementation guide for more details. |
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. Not setting a meaningfulSearch Hub
value negatively impacts usage analytics reporting and machine learning functionalities (see About the Search Hub). -
Coveo Usage Analytics are only sent to the Coveo Usage Analytics service when viewing the published site. Actions performed when viewing site pages in the Experience Editor or in Preview Mode aren’t recorded in the Coveo Usage Analytics service.
-
Website visitors using ad blockers may prevent the tracking of some (or all) their search interface events (see Ad Blocker Impact on UA Data).
Insertion location
Coveo Hive
The Coveo for Sitecore Analytics rendering is an Allowed Control in the following placeholder(s): UI Header
, Recommendations Components
Coveo Hive SXA
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.
Data source options
The following table lists the available data source options for this rendering.
Option name | Description |
---|---|
Coveo Analytics REST endpoint |
The REST endpoint proxy to send usage analytics requests to (see the endpoint component option). |
Search Hub |
See About the Search Hub. |
Coveo Usage Analytics custom metadata |
Key-value custom metadata pair(s) to log with the search interface events (see Log custom metadata in Hive search interface usage analytics events). |
Additional data attributes |
Allows use of the Coveo JavaScript Search Framework Analytics component options that aren’t directly available in the data source. |
Sample generated HTML and corresponding visual output
You configure the Coveo for Sitecore Analytics data source as follows:
Generated HTML:
<div class="CoveoForSitecoreAnalytics"
data-sc-analytics-custom-metadata="{"metadatakey" : "metadatavalue"}">
</div>
<div>
<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"
data-send-to-cloud="true">
</div>
</div>
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.