@kameleoon/javascript-sdk-core 5.14.3 → 5.14.5
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/CHANGELOG.md +18 -0
- package/dist/javascript-sdk-core-browser.cjs.js +11 -5
- package/dist/javascript-sdk-core-browser.cjs.js.map +1 -1
- package/dist/javascript-sdk-core-browser.es.js +11 -5
- package/dist/javascript-sdk-core-browser.es.js.map +1 -1
- package/dist/javascript-sdk-core.cjs.js +11 -5
- package/dist/javascript-sdk-core.cjs.js.map +1 -1
- package/dist/javascript-sdk-core.es.js +11 -5
- package/dist/javascript-sdk-core.es.js.map +1 -1
- package/dist/tracking/tracker.d.ts +2 -1
- package/dist/tracking/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -5242,6 +5242,8 @@ class IntegrityChecker {
|
|
|
5242
5242
|
switch (key) {
|
|
5243
5243
|
case exports.KameleoonData.PageView:
|
|
5244
5244
|
case exports.KameleoonData.Conversion:
|
|
5245
|
+
case exports.KameleoonData.Personalization:
|
|
5246
|
+
case exports.KameleoonData.TargetedSegment:
|
|
5245
5247
|
case exports.KameleoonData.CustomData: {
|
|
5246
5248
|
const hasBadFields = Object.values(data).some((obj) => hasInvalidFields(obj));
|
|
5247
5249
|
if (hasBadFields) {
|
|
@@ -7745,14 +7747,15 @@ class BodyProvider {
|
|
|
7745
7747
|
}
|
|
7746
7748
|
|
|
7747
7749
|
class Tracker {
|
|
7748
|
-
constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, }) {
|
|
7750
|
+
constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, clientConfiguration, }) {
|
|
7749
7751
|
this.intervalId = null;
|
|
7750
|
-
KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
|
|
7752
|
+
KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
|
|
7751
7753
|
this.dataManager = dataManager;
|
|
7752
7754
|
this.trackingStorage = trackingStorage;
|
|
7753
7755
|
this.variationConfiguration = variationConfiguration;
|
|
7754
7756
|
this.requester = requester;
|
|
7755
7757
|
this.bodyProvider = new BodyProvider(prng);
|
|
7758
|
+
this.clientConfiguration = clientConfiguration;
|
|
7756
7759
|
try {
|
|
7757
7760
|
this.intervalId = setInterval(() => {
|
|
7758
7761
|
this.sendDataAll();
|
|
@@ -7762,7 +7765,7 @@ class Tracker {
|
|
|
7762
7765
|
this.intervalId && clearInterval(this.intervalId);
|
|
7763
7766
|
throw err;
|
|
7764
7767
|
}
|
|
7765
|
-
KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
|
|
7768
|
+
KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
|
|
7766
7769
|
}
|
|
7767
7770
|
scheduleVisitor(visitorCode, isConsentProvided) {
|
|
7768
7771
|
KameleoonLogger.debug `CALL: Tracker.scheduleVisitor(visitorCode: ${visitorCode}, isConsentProvided: ${isConsentProvided})`;
|
|
@@ -7947,8 +7950,10 @@ class Tracker {
|
|
|
7947
7950
|
if (!data.url) {
|
|
7948
7951
|
continue;
|
|
7949
7952
|
}
|
|
7950
|
-
if (!isConsentProvided &&
|
|
7951
|
-
|
|
7953
|
+
if (!isConsentProvided &&
|
|
7954
|
+
(!this.clientConfiguration.hasAnyTargetedDeliveryRule ||
|
|
7955
|
+
data instanceof StaticData ||
|
|
7956
|
+
data.data.type !== exports.KameleoonData.Conversion)) {
|
|
7952
7957
|
continue;
|
|
7953
7958
|
}
|
|
7954
7959
|
resultData.push(data);
|
|
@@ -8085,6 +8090,7 @@ class KameleoonClient {
|
|
|
8085
8090
|
requester,
|
|
8086
8091
|
trackingInterval: clientSettings.trackingInterval,
|
|
8087
8092
|
prng: externalPRNG,
|
|
8093
|
+
clientConfiguration,
|
|
8088
8094
|
});
|
|
8089
8095
|
this.tracker = tracker;
|
|
8090
8096
|
this.variationConfiguration = variationConfiguration;
|