coveo.analytics 2.29.1 → 2.29.3
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/README.md +2 -3
- package/dist/browser.mjs +1 -11
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +1 -11
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.cjs +1 -11
- package/dist/library.es.js +1 -11
- package/dist/library.js +1 -11
- package/dist/library.mjs +1 -11
- package/dist/react-native.es.js +1 -11
- package/package.json +1 -1
- package/src/caseAssist/caseAssistClient.spec.ts +10 -0
- package/src/caseAssist/caseAssistClient.ts +0 -3
- package/src/client/analytics.spec.ts +2 -2
- package/src/client/analytics.ts +0 -1
- package/src/insight/insightClient.spec.ts +11 -0
- package/src/insight/insightClient.ts +0 -3
- package/src/searchPage/searchPageClient.spec.ts +12 -0
- package/src/searchPage/searchPageClient.ts +0 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Coveo Analytics JavaScript client
|
|
8
8
|
|
|
9
|
-
The Coveo analytics javascript client, also called coveo.analytics.js or coveoua for short, is responsible for logging analytics events to the Coveo platform. Analytics events may include basic Coveo web events such as
|
|
9
|
+
The Coveo analytics javascript client, also called coveo.analytics.js or coveoua for short, is responsible for logging analytics events to the Coveo platform. Analytics events may include basic Coveo web events such as clicks or searches. For specific usecases, such as commerce and service, dedicated events may be defined and logged.
|
|
10
10
|
|
|
11
11
|
The analytics library is bundled with all Coveo provided UI components. Integrations which exclusively rely on these components, generally don't have to interact with coveoua directly. For Coveo integrations which integrate with an already existing UI and do not use headless, coveoua will be required to ensure events are logged correctly.
|
|
12
12
|
|
|
@@ -101,10 +101,9 @@ You should be able to observe the click event being transmitted to the Coveo bac
|
|
|
101
101
|
|
|
102
102
|
## Sending commerce specific events
|
|
103
103
|
|
|
104
|
-
Commerce specific events such as product selections, shopping cart modifications and transactions are sent to Coveo in the compact [collect protocol](https://docs.coveo.com/en/l41i0031/build-a-search-ui/log-collect-events). Rather than explicitly assembling these payloads by hand, the eCommerce plugin provides APIs to assemble and transmit the payloads.
|
|
104
|
+
Commerce specific events such as product selections, shopping cart modifications and transactions are sent to Coveo in the compact [collect protocol](https://docs.coveo.com/en/l41i0031/build-a-search-ui/log-collect-events). Rather than explicitly assembling these payloads by hand, the eCommerce plugin provides APIs to assemble and transmit the payloads. The `event` is specific to the eCommerce plugin:
|
|
105
105
|
|
|
106
106
|
- `event`: An event, which has been assembled through different plugin actions.
|
|
107
|
-
- `pageview`: An ecommerce specific pageview event which is automatically populated with the current page context.
|
|
108
107
|
|
|
109
108
|
The eCommerce plugin supports adding product data (`ec:addProduct`) as well as setting the [appropriate event action](https://docs.coveo.com/en/l29e0540/coveo-for-commerce/commerce-events-reference#product-action-type-reference) through `ec:setAction`. These calls can be used in series to assemble different types of payloads:
|
|
110
109
|
|
package/dist/browser.mjs
CHANGED
|
@@ -596,7 +596,7 @@ function sha1(bytes) {
|
|
|
596
596
|
const v5 = v35('v5', 0x50, sha1);
|
|
597
597
|
var uuidv5 = v5;
|
|
598
598
|
|
|
599
|
-
const libVersion = "2.29.
|
|
599
|
+
const libVersion = "2.29.3" ;
|
|
600
600
|
|
|
601
601
|
const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
|
|
602
602
|
|
|
@@ -1269,7 +1269,6 @@ class CoveoAnalyticsClient {
|
|
|
1269
1269
|
};
|
|
1270
1270
|
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
1271
1271
|
if (doNotTrack()) {
|
|
1272
|
-
this.clear();
|
|
1273
1272
|
this.runtime.storage = new NullStorage();
|
|
1274
1273
|
}
|
|
1275
1274
|
this.addEventTypeMapping(EventType.view, { newEventType: EventType.view, addClientIdParameter: true });
|
|
@@ -1926,9 +1925,6 @@ class CoveoSearchPageClient {
|
|
|
1926
1925
|
this.coveoAnalyticsClient = shouldDisableAnalytics ? new NoopAnalytics() : new CoveoAnalyticsClient(opts);
|
|
1927
1926
|
}
|
|
1928
1927
|
disable() {
|
|
1929
|
-
if (this.coveoAnalyticsClient instanceof CoveoAnalyticsClient) {
|
|
1930
|
-
this.coveoAnalyticsClient.clear();
|
|
1931
|
-
}
|
|
1932
1928
|
this.coveoAnalyticsClient = new NoopAnalytics();
|
|
1933
1929
|
}
|
|
1934
1930
|
enable() {
|
|
@@ -2831,9 +2827,6 @@ class CaseAssistClient {
|
|
|
2831
2827
|
this.svc = new SVCPlugin({ client: this.coveoAnalyticsClient });
|
|
2832
2828
|
}
|
|
2833
2829
|
disable() {
|
|
2834
|
-
if (this.coveoAnalyticsClient instanceof CoveoAnalyticsClient) {
|
|
2835
|
-
this.coveoAnalyticsClient.clear();
|
|
2836
|
-
}
|
|
2837
2830
|
this.coveoAnalyticsClient = new NoopAnalytics();
|
|
2838
2831
|
this.svc = new SVCPlugin({ client: this.coveoAnalyticsClient });
|
|
2839
2832
|
}
|
|
@@ -2937,9 +2930,6 @@ class CoveoInsightClient {
|
|
|
2937
2930
|
this.coveoAnalyticsClient = shouldDisableAnalytics ? new NoopAnalytics() : new CoveoAnalyticsClient(opts);
|
|
2938
2931
|
}
|
|
2939
2932
|
disable() {
|
|
2940
|
-
if (this.coveoAnalyticsClient instanceof CoveoAnalyticsClient) {
|
|
2941
|
-
this.coveoAnalyticsClient.clear();
|
|
2942
|
-
}
|
|
2943
2933
|
this.coveoAnalyticsClient = new NoopAnalytics();
|
|
2944
2934
|
}
|
|
2945
2935
|
enable() {
|