@blotoutio/edgetag-sdk-browser 0.61.0 → 0.62.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 +10 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
referrer: getReferrer(destination),
|
|
562
562
|
search: getSearch(destination),
|
|
563
563
|
locale: getLocale(),
|
|
564
|
-
sdkVersion: "0.
|
|
564
|
+
sdkVersion: "0.62.0" ,
|
|
565
565
|
...(payload || {}),
|
|
566
566
|
};
|
|
567
567
|
let storage = {};
|
|
@@ -615,11 +615,14 @@
|
|
|
615
615
|
}
|
|
616
616
|
return `${destination}${path}`;
|
|
617
617
|
};
|
|
618
|
-
const getTagURL = (destination, options) => {
|
|
618
|
+
const getTagURL = (destination, eventName, options) => {
|
|
619
619
|
const parsedUrl = new URL(generateUrl(destination, '/tag'));
|
|
620
620
|
if (options === null || options === void 0 ? void 0 : options.sync) {
|
|
621
621
|
parsedUrl.searchParams.set('sync', 'true');
|
|
622
622
|
}
|
|
623
|
+
if (eventName) {
|
|
624
|
+
parsedUrl.searchParams.set('name', eventName);
|
|
625
|
+
}
|
|
623
626
|
return parsedUrl.toString();
|
|
624
627
|
};
|
|
625
628
|
const getInitURL = (destination) => {
|
|
@@ -681,7 +684,7 @@
|
|
|
681
684
|
if (providers) {
|
|
682
685
|
payload.providers = providers;
|
|
683
686
|
}
|
|
684
|
-
postRequest(getTagURL(destination, options), payload, options).catch(error);
|
|
687
|
+
postRequest(getTagURL(destination, eventName, options), payload, options).catch(error);
|
|
685
688
|
};
|
|
686
689
|
const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
687
690
|
if (!getSetting(destination, 'initialized')) {
|
|
@@ -728,6 +731,7 @@
|
|
|
728
731
|
sendTag: sendTag.bind(null, destination),
|
|
729
732
|
manifestVariables: variable.variableSet,
|
|
730
733
|
executionContext,
|
|
734
|
+
destination,
|
|
731
735
|
});
|
|
732
736
|
}
|
|
733
737
|
providerData[pkg.name] = result;
|
|
@@ -1153,6 +1157,9 @@
|
|
|
1153
1157
|
error('Initialization failed');
|
|
1154
1158
|
return;
|
|
1155
1159
|
}
|
|
1160
|
+
if (result.isNewUser && result.consent) {
|
|
1161
|
+
saveConsent(preferences.edgeURL, result.consent);
|
|
1162
|
+
}
|
|
1156
1163
|
const providers = {};
|
|
1157
1164
|
(_a = result.result) === null || _a === void 0 ? void 0 : _a.forEach((pkg) => {
|
|
1158
1165
|
const provider = browserPackages[pkg.package];
|