coveo.analytics 2.28.25 → 2.29.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 +9 -16
- package/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +9 -17
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/client/analyticsBeaconClient.d.ts +1 -3
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.cjs +9 -17
- package/dist/library.es.js +9 -16
- package/dist/library.js +9 -17
- package/dist/library.mjs +9 -17
- package/dist/react-native.es.js +9 -16
- package/package.json +3 -3
- package/src/client/analyticsBeaconClient.spec.ts +11 -7
- package/src/client/analyticsBeaconClient.ts +8 -20
package/dist/coveoua.debug.js
CHANGED
|
@@ -728,7 +728,7 @@
|
|
|
728
728
|
const v5 = v35('v5', 0x50, sha1);
|
|
729
729
|
var uuidv5 = v5;
|
|
730
730
|
|
|
731
|
-
var libVersion = "2.
|
|
731
|
+
var libVersion = "2.29.1" ;
|
|
732
732
|
|
|
733
733
|
var getFormattedLocation = function (location) {
|
|
734
734
|
return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
|
|
@@ -1265,8 +1265,8 @@
|
|
|
1265
1265
|
};
|
|
1266
1266
|
AnalyticsBeaconClient.prototype.encodeForEventType = function (eventType, payload) {
|
|
1267
1267
|
return this.isEventTypeLegacy(eventType)
|
|
1268
|
-
? this.
|
|
1269
|
-
: this.
|
|
1268
|
+
? this.encodeEventToJson(eventType, payload)
|
|
1269
|
+
: this.encodeEventToJson(eventType, payload, this.opts.token);
|
|
1270
1270
|
};
|
|
1271
1271
|
AnalyticsBeaconClient.prototype.getQueryParamsForEventType = function (eventType) {
|
|
1272
1272
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1292,20 +1292,12 @@
|
|
|
1292
1292
|
AnalyticsBeaconClient.prototype.isEventTypeLegacy = function (eventType) {
|
|
1293
1293
|
return [EventType.click, EventType.custom, EventType.search, EventType.view].indexOf(eventType) !== -1;
|
|
1294
1294
|
};
|
|
1295
|
-
AnalyticsBeaconClient.prototype.
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
return
|
|
1301
|
-
.filter(function (key) { return !!payload[key]; })
|
|
1302
|
-
.map(function (key) { return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(_this.encodeValue(payload[key]))); })
|
|
1303
|
-
.join('&');
|
|
1304
|
-
};
|
|
1305
|
-
AnalyticsBeaconClient.prototype.encodeValue = function (value) {
|
|
1306
|
-
return typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean'
|
|
1307
|
-
? value
|
|
1308
|
-
: JSON.stringify(value);
|
|
1295
|
+
AnalyticsBeaconClient.prototype.encodeEventToJson = function (eventType, payload, access_token) {
|
|
1296
|
+
var encoded = "".concat(eventType, "Event=").concat(encodeURIComponent(JSON.stringify(payload)));
|
|
1297
|
+
if (access_token) {
|
|
1298
|
+
encoded = "access_token=".concat(encodeURIComponent(access_token), "&").concat(encoded);
|
|
1299
|
+
}
|
|
1300
|
+
return encoded;
|
|
1309
1301
|
};
|
|
1310
1302
|
return AnalyticsBeaconClient;
|
|
1311
1303
|
}());
|