@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.
@@ -5269,6 +5269,8 @@ class IntegrityChecker {
5269
5269
  switch (key) {
5270
5270
  case KameleoonData.PageView:
5271
5271
  case KameleoonData.Conversion:
5272
+ case KameleoonData.Personalization:
5273
+ case KameleoonData.TargetedSegment:
5272
5274
  case KameleoonData.CustomData: {
5273
5275
  const hasBadFields = Object.values(data).some((obj) => hasInvalidFields(obj));
5274
5276
  if (hasBadFields) {
@@ -7781,14 +7783,15 @@ class BodyProvider {
7781
7783
  }
7782
7784
 
7783
7785
  class Tracker {
7784
- constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, }) {
7786
+ constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, clientConfiguration, }) {
7785
7787
  this.intervalId = null;
7786
- KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
7788
+ KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
7787
7789
  this.dataManager = dataManager;
7788
7790
  this.trackingStorage = trackingStorage;
7789
7791
  this.variationConfiguration = variationConfiguration;
7790
7792
  this.requester = requester;
7791
7793
  this.bodyProvider = new BodyProvider(prng);
7794
+ this.clientConfiguration = clientConfiguration;
7792
7795
  try {
7793
7796
  this.intervalId = setInterval(() => {
7794
7797
  this.sendDataAll();
@@ -7798,7 +7801,7 @@ class Tracker {
7798
7801
  this.intervalId && clearInterval(this.intervalId);
7799
7802
  throw err;
7800
7803
  }
7801
- KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
7804
+ KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
7802
7805
  }
7803
7806
  scheduleVisitor(visitorCode, isConsentProvided) {
7804
7807
  KameleoonLogger.debug `CALL: Tracker.scheduleVisitor(visitorCode: ${visitorCode}, isConsentProvided: ${isConsentProvided})`;
@@ -7983,8 +7986,10 @@ class Tracker {
7983
7986
  if (!data.url) {
7984
7987
  continue;
7985
7988
  }
7986
- if (!isConsentProvided && (data instanceof StaticData ||
7987
- data.data.type !== KameleoonData.Conversion)) {
7989
+ if (!isConsentProvided &&
7990
+ (!this.clientConfiguration.hasAnyTargetedDeliveryRule ||
7991
+ data instanceof StaticData ||
7992
+ data.data.type !== KameleoonData.Conversion)) {
7988
7993
  continue;
7989
7994
  }
7990
7995
  resultData.push(data);
@@ -8121,6 +8126,7 @@ class KameleoonClient {
8121
8126
  requester,
8122
8127
  trackingInterval: clientSettings.trackingInterval,
8123
8128
  prng: externalPRNG,
8129
+ clientConfiguration,
8124
8130
  });
8125
8131
  this.tracker = tracker;
8126
8132
  this.variationConfiguration = variationConfiguration;