@salesforcedevs/docs-components 1.3.150-alpha6 → 1.3.150-alpha7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -436,6 +436,23 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
436
436
|
);
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
+
async logCoveoPageView() {
|
|
440
|
+
if (this.coveoOrganizationId) {
|
|
441
|
+
console.log(
|
|
442
|
+
"log coveo page view with token ",
|
|
443
|
+
this.coveoAnalyticsToken
|
|
444
|
+
);
|
|
445
|
+
const ua = new CoveoAnalyticsClient({
|
|
446
|
+
token: this.coveoAnalyticsToken,
|
|
447
|
+
endpoint: `https://${this.coveoOrganizationId}.analytics.org.coveo.com`
|
|
448
|
+
}); // MILES TODO: replace 'fullsalesforce' with coveo organizationid
|
|
449
|
+
ua.sendViewEvent({
|
|
450
|
+
contentIdKey: "@clickableuri",
|
|
451
|
+
contentIdValue: window.location.href
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
439
456
|
async fetchDocument(): Promise<void> {
|
|
440
457
|
this.setState({
|
|
441
458
|
isFetchingDocument: true
|
|
@@ -452,21 +469,6 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
452
469
|
return;
|
|
453
470
|
}
|
|
454
471
|
|
|
455
|
-
if (this.coveoOrganizationId) {
|
|
456
|
-
console.log(
|
|
457
|
-
"log coveo page view with token ",
|
|
458
|
-
this.coveoAnalyticsToken
|
|
459
|
-
);
|
|
460
|
-
const ua = new CoveoAnalyticsClient({
|
|
461
|
-
token: this.coveoAnalyticsToken,
|
|
462
|
-
endpoint: `https://${this.coveoOrganizationId}.analytics.org.coveo.com`
|
|
463
|
-
}); // MILES TODO: replace 'fullsalesforce' with coveo organizationid
|
|
464
|
-
ua.sendViewEvent({
|
|
465
|
-
contentIdKey: "@clickableuri",
|
|
466
|
-
contentIdValue: window.location.href
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
|
|
470
472
|
this.docTitle = data.docTitle;
|
|
471
473
|
this.tocMap = data.tocMap;
|
|
472
474
|
this.sidebarContent = data.toc;
|
|
@@ -515,6 +517,7 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
515
517
|
}
|
|
516
518
|
|
|
517
519
|
async fetchContent(): Promise<void> {
|
|
520
|
+
this.logCoveoPageView();
|
|
518
521
|
this.setState({
|
|
519
522
|
isFetchingContent: true
|
|
520
523
|
});
|