File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ document.addEventListener('DOMContentLoaded', async function () {
11
11
const searchObj = await getsearchObj ( )
12
12
Coveo . SearchEndpoint . configureCloudV2Endpoint ( searchObj . org_id , searchObj . token , `https://${ searchObj . org_id } .org.coveo.com/rest/search` ) ;
13
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
+
14
20
const root = document . getElementById ( "search" ) ;
15
21
const searchBoxRoot = document . getElementById ( "searchbox" ) ;
16
22
Coveo . initSearchbox ( searchBoxRoot , "/search.html" ) ;
You can’t perform that action at this time.
0 commit comments