@blotoutio/edgetag-sdk-browser 0.46.0 → 0.47.0
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.js +15 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
referrer: getReferrer(),
|
|
375
375
|
search: getSearch(),
|
|
376
376
|
locale: getLocale(),
|
|
377
|
-
sdkVersion: "0.
|
|
377
|
+
sdkVersion: "0.47.0" ,
|
|
378
378
|
...(payload || {}),
|
|
379
379
|
};
|
|
380
380
|
let storage = {};
|
|
@@ -840,6 +840,17 @@
|
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
+
try {
|
|
844
|
+
window.dispatchEvent(new CustomEvent('edgetag-consent', {
|
|
845
|
+
detail: {
|
|
846
|
+
oldConsent: existingConsent,
|
|
847
|
+
newConsent: consent,
|
|
848
|
+
},
|
|
849
|
+
}));
|
|
850
|
+
}
|
|
851
|
+
catch {
|
|
852
|
+
// do nothing
|
|
853
|
+
}
|
|
843
854
|
/* Calling Consent for all providers, not on instance level */
|
|
844
855
|
for (const pkg of Object.values(providerPackages)) {
|
|
845
856
|
if (!pkg || !pkg.name || !pkg.consent) {
|
|
@@ -867,16 +878,17 @@
|
|
|
867
878
|
if (!value) {
|
|
868
879
|
return;
|
|
869
880
|
}
|
|
881
|
+
let updatedValue = value;
|
|
870
882
|
if (typeof value !== 'string') {
|
|
871
883
|
try {
|
|
872
|
-
|
|
884
|
+
updatedValue = JSON.stringify(value);
|
|
873
885
|
}
|
|
874
886
|
catch {
|
|
875
887
|
log('Error stringify value.');
|
|
876
888
|
return;
|
|
877
889
|
}
|
|
878
890
|
}
|
|
879
|
-
handleData({ [`${provider}::${key}`]:
|
|
891
|
+
handleData({ [`${provider}::${key}`]: updatedValue });
|
|
880
892
|
};
|
|
881
893
|
const handleCaptureQuery = (provider, key, persistType, map) => {
|
|
882
894
|
try {
|