@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.14.5 (2025-08-20)
4
+
5
+ > [!WARNING]
6
+ > If you're upgrading from a version earlier than 5.14.0 and run into any unexpected build or SDK-related issues, please reach out to the Kameleoon Support Team. We're here to ensure your transition is smooth and will promptly address any concerns.
7
+
8
+ ### Patch Changes
9
+
10
+ - Corrected the logic for sending tracking data to comply with GDPR requirements.
11
+
3
12
  ## 5.14.4 (2025-08-13)
4
13
 
5
14
  > [!WARNING]
@@ -7785,14 +7785,15 @@ class BodyProvider {
7785
7785
  }
7786
7786
 
7787
7787
  class Tracker {
7788
- constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, }) {
7788
+ constructor({ dataManager, trackingStorage, variationConfiguration, trackingInterval, requester, prng, clientConfiguration, }) {
7789
7789
  this.intervalId = null;
7790
- KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
7790
+ KameleoonLogger.debug `CALL: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
7791
7791
  this.dataManager = dataManager;
7792
7792
  this.trackingStorage = trackingStorage;
7793
7793
  this.variationConfiguration = variationConfiguration;
7794
7794
  this.requester = requester;
7795
7795
  this.bodyProvider = new BodyProvider(prng);
7796
+ this.clientConfiguration = clientConfiguration;
7796
7797
  try {
7797
7798
  this.intervalId = setInterval(() => {
7798
7799
  this.sendDataAll();
@@ -7802,7 +7803,7 @@ class Tracker {
7802
7803
  this.intervalId && clearInterval(this.intervalId);
7803
7804
  throw err;
7804
7805
  }
7805
- KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng)`;
7806
+ KameleoonLogger.debug `RETURN: new Tracker(dataManager, trackingStorage, variationConfiguration, trackingInterval: ${trackingInterval}, requester, prng, clientConfiguration)`;
7806
7807
  }
7807
7808
  scheduleVisitor(visitorCode, isConsentProvided) {
7808
7809
  KameleoonLogger.debug `CALL: Tracker.scheduleVisitor(visitorCode: ${visitorCode}, isConsentProvided: ${isConsentProvided})`;
@@ -7987,8 +7988,10 @@ class Tracker {
7987
7988
  if (!data.url) {
7988
7989
  continue;
7989
7990
  }
7990
- if (!isConsentProvided && (data instanceof StaticData ||
7991
- data.data.type !== exports.KameleoonData.Conversion)) {
7991
+ if (!isConsentProvided &&
7992
+ (!this.clientConfiguration.hasAnyTargetedDeliveryRule ||
7993
+ data instanceof StaticData ||
7994
+ data.data.type !== exports.KameleoonData.Conversion)) {
7992
7995
  continue;
7993
7996
  }
7994
7997
  resultData.push(data);
@@ -8125,6 +8128,7 @@ class KameleoonClient {
8125
8128
  requester,
8126
8129
  trackingInterval: clientSettings.trackingInterval,
8127
8130
  prng: externalPRNG,
8131
+ clientConfiguration,
8128
8132
  });
8129
8133
  this.tracker = tracker;
8130
8134
  this.variationConfiguration = variationConfiguration;