@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.
@@ -5240,6 +5240,8 @@ class IntegrityChecker {
5240
5240
  switch (key) {
5241
5241
  case KameleoonData.PageView:
5242
5242
  case KameleoonData.Conversion:
5243
+ case KameleoonData.Personalization:
5244
+ case KameleoonData.TargetedSegment:
5243
5245
  case KameleoonData.CustomData: {
5244
5246
  const hasBadFields = Object.values(data).some((obj) => hasInvalidFields(obj));
5245
5247
  if (hasBadFields) {
@@ -7743,14 +7745,15 @@ class BodyProvider {
7743
7745
  }
7744
7746
 
7745
7747
  class Tracker {
7746
- constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, }) {
7748
+ constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, clientConfiguration, }) {
7747
7749
  this.intervalId = null;
7748
- KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
7750
+ KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
7749
7751
  this.dataManager = dataManager;
7750
7752
  this.trackingStorage = trackingStorage;
7751
7753
  this.variationConfiguration = variationConfiguration;
7752
7754
  this.requester = requester;
7753
7755
  this.bodyProvider = new BodyProvider(prng);
7756
+ this.clientConfiguration = clientConfiguration;
7754
7757
  try {
7755
7758
  this.intervalId = setInterval(() => {
7756
7759
  this.sendDataAll();
@@ -7760,7 +7763,7 @@ class Tracker {
7760
7763
  this.intervalId && clearInterval(this.intervalId);
7761
7764
  throw err;
7762
7765
  }
7763
- KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
7766
+ KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
7764
7767
  }
7765
7768
  scheduleVisitor(visitorCode, isConsentProvided) {
7766
7769
  KameleoonLogger.debug `CALL: Tracker.scheduleVisitor(visitorCode: ${visitorCode}, isConsentProvided: ${isConsentProvided})`;
@@ -7945,8 +7948,10 @@ class Tracker {
7945
7948
  if (!data.url) {
7946
7949
  continue;
7947
7950
  }
7948
- if (!isConsentProvided && (data instanceof StaticData ||
7949
- data.data.type !== KameleoonData.Conversion)) {
7951
+ if (!isConsentProvided &&
7952
+ (!this.clientConfiguration.hasAnyTargetedDeliveryRule ||
7953
+ data instanceof StaticData ||
7954
+ data.data.type !== KameleoonData.Conversion)) {
7950
7955
  continue;
7951
7956
  }
7952
7957
  resultData.push(data);
@@ -8083,6 +8088,7 @@ class KameleoonClient {
8083
8088
  requester,
8084
8089
  trackingInterval: clientSettings.trackingInterval,
8085
8090
  prng: externalPRNG,
8091
+ clientConfiguration,
8086
8092
  });
8087
8093
  this.tracker = tracker;
8088
8094
  this.variationConfiguration = variationConfiguration;