@blotoutio/edgetag-sdk-js 0.22.2 → 0.22.3
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/index.cjs +5 -1
- package/index.esm.js +5 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -276,6 +276,9 @@ const allowProviderWithConsent = (providers, providerId) => {
|
|
|
276
276
|
}
|
|
277
277
|
return true;
|
|
278
278
|
};
|
|
279
|
+
const checkProviderConsent = (providerId) => {
|
|
280
|
+
return checkConsent({ [providerId]: true });
|
|
281
|
+
};
|
|
279
282
|
|
|
280
283
|
const tagStorage = 'edgeTag';
|
|
281
284
|
const consentKey = 'consent';
|
|
@@ -509,7 +512,7 @@ const getStandardPayload = (payload) => {
|
|
|
509
512
|
referrer: getReferrer(),
|
|
510
513
|
search: getSearch(),
|
|
511
514
|
locale: getLocale(),
|
|
512
|
-
sdkVersion: "0.22.
|
|
515
|
+
sdkVersion: "0.22.3" ,
|
|
513
516
|
...(payload || {}),
|
|
514
517
|
};
|
|
515
518
|
let storage = {};
|
|
@@ -652,6 +655,7 @@ const handleTag = (eventName, data = {}, providers, options) => {
|
|
|
652
655
|
if (!pkg ||
|
|
653
656
|
!pkg.name ||
|
|
654
657
|
!pkg.tag ||
|
|
658
|
+
!checkProviderConsent(pkg.name) ||
|
|
655
659
|
!allowProviderWithConsent(providers, pkg.name)) {
|
|
656
660
|
return;
|
|
657
661
|
}
|
package/index.esm.js
CHANGED
|
@@ -274,6 +274,9 @@ const allowProviderWithConsent = (providers, providerId) => {
|
|
|
274
274
|
}
|
|
275
275
|
return true;
|
|
276
276
|
};
|
|
277
|
+
const checkProviderConsent = (providerId) => {
|
|
278
|
+
return checkConsent({ [providerId]: true });
|
|
279
|
+
};
|
|
277
280
|
|
|
278
281
|
const tagStorage = 'edgeTag';
|
|
279
282
|
const consentKey = 'consent';
|
|
@@ -507,7 +510,7 @@ const getStandardPayload = (payload) => {
|
|
|
507
510
|
referrer: getReferrer(),
|
|
508
511
|
search: getSearch(),
|
|
509
512
|
locale: getLocale(),
|
|
510
|
-
sdkVersion: "0.22.
|
|
513
|
+
sdkVersion: "0.22.3" ,
|
|
511
514
|
...(payload || {}),
|
|
512
515
|
};
|
|
513
516
|
let storage = {};
|
|
@@ -650,6 +653,7 @@ const handleTag = (eventName, data = {}, providers, options) => {
|
|
|
650
653
|
if (!pkg ||
|
|
651
654
|
!pkg.name ||
|
|
652
655
|
!pkg.tag ||
|
|
656
|
+
!checkProviderConsent(pkg.name) ||
|
|
653
657
|
!allowProviderWithConsent(providers, pkg.name)) {
|
|
654
658
|
return;
|
|
655
659
|
}
|