@kameleoon/javascript-sdk-core 5.14.4 → 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.
@@ -7783,14 +7783,15 @@ class BodyProvider {
7783
7783
  }
7784
7784
 
7785
7785
  class Tracker {
7786
- constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, }) {
7786
+ constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, clientConfiguration, }) {
7787
7787
  this.intervalId = null;
7788
- 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)`;
7789
7789
  this.dataManager = dataManager;
7790
7790
  this.trackingStorage = trackingStorage;
7791
7791
  this.variationConfiguration = variationConfiguration;
7792
7792
  this.requester = requester;
7793
7793
  this.bodyProvider = new BodyProvider(prng);
7794
+ this.clientConfiguration = clientConfiguration;
7794
7795
  try {
7795
7796
  this.intervalId = setInterval(() => {
7796
7797
  this.sendDataAll();
@@ -7800,7 +7801,7 @@ class Tracker {
7800
7801
  this.intervalId && clearInterval(this.intervalId);
7801
7802
  throw err;
7802
7803
  }
7803
- 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)`;
7804
7805
  }
7805
7806
  scheduleVisitor(visitorCode, isConsentProvided) {
7806
7807
  KameleoonLogger.debug `CALL: Tracker.scheduleVisitor(visitorCode: ${visitorCode}, isConsentProvided: ${isConsentProvided})`;
@@ -7985,8 +7986,10 @@ class Tracker {
7985
7986
  if (!data.url) {
7986
7987
  continue;
7987
7988
  }
7988
- if (!isConsentProvided && (data instanceof StaticData ||
7989
- data.data.type !== KameleoonData.Conversion)) {
7989
+ if (!isConsentProvided &&
7990
+ (!this.clientConfiguration.hasAnyTargetedDeliveryRule ||
7991
+ data instanceof StaticData ||
7992
+ data.data.type !== KameleoonData.Conversion)) {
7990
7993
  continue;
7991
7994
  }
7992
7995
  resultData.push(data);
@@ -8123,6 +8126,7 @@ class KameleoonClient {
8123
8126
  requester,
8124
8127
  trackingInterval: clientSettings.trackingInterval,
8125
8128
  prng: externalPRNG,
8129
+ clientConfiguration,
8126
8130
  });
8127
8131
  this.tracker = tracker;
8128
8132
  this.variationConfiguration = variationConfiguration;