@salesforcedevs/docs-components 1.3.150-alpha5 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.150-alpha5",
3
+ "version": "1.3.150-alpha7",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -219,7 +219,10 @@ export default class AmfReference extends LightningElement {
219
219
 
220
220
  private logCoveoPageView() {
221
221
  if (this.coveoOrganizationId) {
222
- console.log("log coveo page view");
222
+ console.log(
223
+ "log coveo page view with token ",
224
+ this.coveoAnalyticsToken
225
+ );
223
226
  const ua = new CoveoAnalyticsClient({
224
227
  token: this.coveoAnalyticsToken,
225
228
  endpoint: `https://${"fullsalesforce"}.analytics.org.coveo.com`
@@ -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,18 +469,6 @@ export default class DocXmlContent extends LightningElementWithState<{
452
469
  return;
453
470
  }
454
471
 
455
- if (this.coveoOrganizationId) {
456
- console.log("log coveo page view");
457
- const ua = new CoveoAnalyticsClient({
458
- token: this.coveoAnalyticsToken,
459
- endpoint: `https://${this.coveoOrganizationId}.analytics.org.coveo.com`
460
- }); // MILES TODO: replace 'fullsalesforce' with coveo organizationid
461
- ua.sendViewEvent({
462
- contentIdKey: "@clickableuri",
463
- contentIdValue: window.location.href
464
- });
465
- }
466
-
467
472
  this.docTitle = data.docTitle;
468
473
  this.tocMap = data.tocMap;
469
474
  this.sidebarContent = data.toc;
@@ -512,6 +517,7 @@ export default class DocXmlContent extends LightningElementWithState<{
512
517
  }
513
518
 
514
519
  async fetchContent(): Promise<void> {
520
+ this.logCoveoPageView();
515
521
  this.setState({
516
522
  isFetchingContent: true
517
523
  });