@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.
@@ -7745,14 +7745,15 @@ class BodyProvider {
7745
7745
  }
7746
7746
 
7747
7747
  class Tracker {
7748
- constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, }) {
7748
+ constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, clientConfiguration, }) {
7749
7749
  this.intervalId = null;
7750
- 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)`;
7751
7751
  this.dataManager = dataManager;
7752
7752
  this.trackingStorage = trackingStorage;
7753
7753
  this.variationConfiguration = variationConfiguration;
7754
7754
  this.requester = requester;
7755
7755
  this.bodyProvider = new BodyProvider(prng);
7756
+ this.clientConfiguration = clientConfiguration;
7756
7757
  try {
7757
7758
  this.intervalId = setInterval(() => {
7758
7759
  this.sendDataAll();
@@ -7762,7 +7763,7 @@ class Tracker {
7762
7763
  this.intervalId && clearInterval(this.intervalId);
7763
7764
  throw err;
7764
7765
  }
7765
- 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)`;
7766
7767
  }
7767
7768
  scheduleVisitor(visitorCode, isConsentProvided) {
7768
7769
  KameleoonLogger.debug `CALL: Tracker.scheduleVisitor(visitorCode: ${visitorCode}, isConsentProvided: ${isConsentProvided})`;
@@ -7947,8 +7948,10 @@ class Tracker {
7947
7948
  if (!data.url) {
7948
7949
  continue;
7949
7950
  }
7950
- if (!isConsentProvided && (data instanceof StaticData ||
7951
- data.data.type !== KameleoonData.Conversion)) {
7951
+ if (!isConsentProvided &&
7952
+ (!this.clientConfiguration.hasAnyTargetedDeliveryRule ||
7953
+ data instanceof StaticData ||
7954
+ data.data.type !== KameleoonData.Conversion)) {
7952
7955
  continue;
7953
7956
  }
7954
7957
  resultData.push(data);
@@ -8085,6 +8088,7 @@ class KameleoonClient {
8085
8088
  requester,
8086
8089
  trackingInterval: clientSettings.trackingInterval,
8087
8090
  prng: externalPRNG,
8091
+ clientConfiguration,
8088
8092
  });
8089
8093
  this.tracker = tracker;
8090
8094
  this.variationConfiguration = variationConfiguration;