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