coveo.analytics 2.29.5 → 2.30.1
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/dist/browser.mjs +5 -3
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +5 -3
- 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 +5 -3
- package/dist/library.es.js +5 -3
- package/dist/library.js +5 -3
- package/dist/library.mjs +5 -3
- package/dist/react-native.es.js +5 -3
- package/package.json +1 -1
- package/src/client/analytics.spec.ts +3 -2
- package/src/client/analytics.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const libVersion = "2.
|
|
1
|
+
export declare const libVersion = "2.30.1";
|
package/dist/library.cjs
CHANGED
|
@@ -731,7 +731,7 @@ function sha1(bytes) {
|
|
|
731
731
|
const v5 = v35('v5', 0x50, sha1);
|
|
732
732
|
var uuidv5 = v5;
|
|
733
733
|
|
|
734
|
-
var libVersion = "2.
|
|
734
|
+
var libVersion = "2.30.1" ;
|
|
735
735
|
|
|
736
736
|
var getFormattedLocation = function (location) {
|
|
737
737
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
|
@@ -83057,9 +83057,11 @@ var CoveoAnalyticsClient = (function () {
|
|
|
83057
83057
|
visitorIdProvider: this,
|
|
83058
83058
|
preprocessRequest: this.options.preprocessRequest,
|
|
83059
83059
|
};
|
|
83060
|
-
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
83061
83060
|
if (doNotTrack()) {
|
|
83062
|
-
this.runtime
|
|
83061
|
+
this.runtime = new NoopRuntime();
|
|
83062
|
+
}
|
|
83063
|
+
else {
|
|
83064
|
+
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
83063
83065
|
}
|
|
83064
83066
|
this.addEventTypeMapping(exports.EventType.view, { newEventType: exports.EventType.view, addClientIdParameter: true });
|
|
83065
83067
|
this.addEventTypeMapping(exports.EventType.click, { newEventType: exports.EventType.click, addClientIdParameter: true });
|
package/dist/library.es.js
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.
|
|
599
|
+
const libVersion = "2.30.1" ;
|
|
600
600
|
|
|
601
601
|
const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
|
|
602
602
|
|
|
@@ -1274,9 +1274,11 @@ class CoveoAnalyticsClient {
|
|
|
1274
1274
|
visitorIdProvider: this,
|
|
1275
1275
|
preprocessRequest: this.options.preprocessRequest,
|
|
1276
1276
|
};
|
|
1277
|
-
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
1278
1277
|
if (doNotTrack()) {
|
|
1279
|
-
this.runtime
|
|
1278
|
+
this.runtime = new NoopRuntime();
|
|
1279
|
+
}
|
|
1280
|
+
else {
|
|
1281
|
+
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
1280
1282
|
}
|
|
1281
1283
|
this.addEventTypeMapping(EventType.view, { newEventType: EventType.view, addClientIdParameter: true });
|
|
1282
1284
|
this.addEventTypeMapping(EventType.click, { newEventType: EventType.click, addClientIdParameter: true });
|
package/dist/library.js
CHANGED
|
@@ -731,7 +731,7 @@ function sha1(bytes) {
|
|
|
731
731
|
const v5 = v35('v5', 0x50, sha1);
|
|
732
732
|
var uuidv5 = v5;
|
|
733
733
|
|
|
734
|
-
var libVersion = "2.
|
|
734
|
+
var libVersion = "2.30.1" ;
|
|
735
735
|
|
|
736
736
|
var getFormattedLocation = function (location) {
|
|
737
737
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
|
@@ -83057,9 +83057,11 @@ var CoveoAnalyticsClient = (function () {
|
|
|
83057
83057
|
visitorIdProvider: this,
|
|
83058
83058
|
preprocessRequest: this.options.preprocessRequest,
|
|
83059
83059
|
};
|
|
83060
|
-
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
83061
83060
|
if (doNotTrack()) {
|
|
83062
|
-
this.runtime
|
|
83061
|
+
this.runtime = new NoopRuntime();
|
|
83062
|
+
}
|
|
83063
|
+
else {
|
|
83064
|
+
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
83063
83065
|
}
|
|
83064
83066
|
this.addEventTypeMapping(exports.EventType.view, { newEventType: exports.EventType.view, addClientIdParameter: true });
|
|
83065
83067
|
this.addEventTypeMapping(exports.EventType.click, { newEventType: exports.EventType.click, addClientIdParameter: true });
|
package/dist/library.mjs
CHANGED
|
@@ -729,7 +729,7 @@ function sha1(bytes) {
|
|
|
729
729
|
const v5 = v35('v5', 0x50, sha1);
|
|
730
730
|
var uuidv5 = v5;
|
|
731
731
|
|
|
732
|
-
var libVersion = "2.
|
|
732
|
+
var libVersion = "2.30.1" ;
|
|
733
733
|
|
|
734
734
|
var getFormattedLocation = function (location) {
|
|
735
735
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
|
@@ -83055,9 +83055,11 @@ var CoveoAnalyticsClient = (function () {
|
|
|
83055
83055
|
visitorIdProvider: this,
|
|
83056
83056
|
preprocessRequest: this.options.preprocessRequest,
|
|
83057
83057
|
};
|
|
83058
|
-
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
83059
83058
|
if (doNotTrack()) {
|
|
83060
|
-
this.runtime
|
|
83059
|
+
this.runtime = new NoopRuntime();
|
|
83060
|
+
}
|
|
83061
|
+
else {
|
|
83062
|
+
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
83061
83063
|
}
|
|
83062
83064
|
this.addEventTypeMapping(EventType.view, { newEventType: EventType.view, addClientIdParameter: true });
|
|
83063
83065
|
this.addEventTypeMapping(EventType.click, { newEventType: EventType.click, addClientIdParameter: true });
|
package/dist/react-native.es.js
CHANGED
|
@@ -665,7 +665,7 @@ const addPageViewToHistory = (pageViewValue) => __awaiter(void 0, void 0, void 0
|
|
|
665
665
|
yield store.addElementAsync(historyElement);
|
|
666
666
|
});
|
|
667
667
|
|
|
668
|
-
const libVersion = "2.
|
|
668
|
+
const libVersion = "2.30.1" ;
|
|
669
669
|
|
|
670
670
|
const getFormattedLocation = (location) => `${location.protocol}//${location.hostname}${location.pathname.indexOf('/') === 0 ? location.pathname : `/${location.pathname}`}${location.search}`;
|
|
671
671
|
|
|
@@ -1275,9 +1275,11 @@ class CoveoAnalyticsClient {
|
|
|
1275
1275
|
visitorIdProvider: this,
|
|
1276
1276
|
preprocessRequest: this.options.preprocessRequest,
|
|
1277
1277
|
};
|
|
1278
|
-
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
1279
1278
|
if (doNotTrack()) {
|
|
1280
|
-
this.runtime
|
|
1279
|
+
this.runtime = new NoopRuntime();
|
|
1280
|
+
}
|
|
1281
|
+
else {
|
|
1282
|
+
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
1281
1283
|
}
|
|
1282
1284
|
this.addEventTypeMapping(EventType.view, { newEventType: EventType.view, addClientIdParameter: true });
|
|
1283
1285
|
this.addEventTypeMapping(EventType.click, { newEventType: EventType.click, addClientIdParameter: true });
|
package/package.json
CHANGED
|
@@ -11,10 +11,11 @@ import {IAnalyticsRequestOptions} from './analyticsRequestClient';
|
|
|
11
11
|
import {CookieAndLocalStorage, CookieStorage, NullStorage} from '../storage';
|
|
12
12
|
import HistoryStore from '../history';
|
|
13
13
|
import {mockFetch} from '../../tests/fetchMock';
|
|
14
|
-
import {BrowserRuntime} from './runtimeEnvironment';
|
|
14
|
+
import {BrowserRuntime, NoopRuntime} from './runtimeEnvironment';
|
|
15
15
|
import * as doNotTrack from '../donottrack';
|
|
16
16
|
import {Cookie} from '../cookieutils';
|
|
17
17
|
import {CoveoLinkParam} from '../plugins/link';
|
|
18
|
+
import {NoopAnalytics} from './noopAnalytics';
|
|
18
19
|
|
|
19
20
|
const aVisitorId = '123';
|
|
20
21
|
jest.mock('uuid', () => ({
|
|
@@ -663,7 +664,7 @@ describe('doNotTrack', () => {
|
|
|
663
664
|
|
|
664
665
|
let client = new CoveoAnalyticsClient({});
|
|
665
666
|
|
|
666
|
-
expect(client.runtime).toBeInstanceOf(
|
|
667
|
+
expect(client.runtime).toBeInstanceOf(NoopRuntime);
|
|
667
668
|
expect(client.runtime.storage).toBeInstanceOf(NullStorage);
|
|
668
669
|
});
|
|
669
670
|
|
package/src/client/analytics.ts
CHANGED
|
@@ -182,9 +182,10 @@ export class CoveoAnalyticsClient implements AnalyticsClient, VisitorIdProvider
|
|
|
182
182
|
preprocessRequest: this.options.preprocessRequest,
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
-
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
186
185
|
if (doNotTrack()) {
|
|
187
|
-
this.runtime
|
|
186
|
+
this.runtime = new NoopRuntime();
|
|
187
|
+
} else {
|
|
188
|
+
this.runtime = this.options.runtimeEnvironment || this.initRuntime(clientsOptions);
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
this.addEventTypeMapping(EventType.view, {newEventType: EventType.view, addClientIdParameter: true});
|