We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6f7d1c commit e55be15Copy full SHA for e55be15
assets/js/coveo.js
@@ -11,6 +11,12 @@ document.addEventListener('DOMContentLoaded', async function () {
11
const searchObj = await getsearchObj()
12
Coveo.SearchEndpoint.configureCloudV2Endpoint(searchObj.org_id, searchObj.token, `https://${searchObj.org_id}.org.coveo.com/rest/search`);
13
14
+ const analyticsElement = document.querySelector('.CoveoAnalytics');
15
+ if (analyticsElement) {
16
+ const analyticsEndpoint = `https://${searchObj.org_id}.analytics.org.coveo.com/rest/ua`;
17
+ analyticsElement.setAttribute('data-endpoint', analyticsEndpoint);
18
+ }
19
+
20
const root = document.getElementById("search");
21
const searchBoxRoot = document.getElementById("searchbox");
22
Coveo.initSearchbox(searchBoxRoot, "/search.html");
0 commit comments