@blotoutio/edgetag-sdk-browser 0.41.1 → 0.42.1
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 +7 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
referrer: getReferrer(),
|
|
366
366
|
search: getSearch(),
|
|
367
367
|
locale: getLocale(),
|
|
368
|
-
sdkVersion: "0.
|
|
368
|
+
sdkVersion: "0.42.1" ,
|
|
369
369
|
...(payload || {}),
|
|
370
370
|
};
|
|
371
371
|
let storage = {};
|
|
@@ -792,6 +792,7 @@
|
|
|
792
792
|
getEdgeData: handleGetData,
|
|
793
793
|
keyName: `${keyPrefix}Store`,
|
|
794
794
|
executionContext,
|
|
795
|
+
session: null,
|
|
795
796
|
});
|
|
796
797
|
}
|
|
797
798
|
}
|
|
@@ -918,10 +919,11 @@
|
|
|
918
919
|
});
|
|
919
920
|
};
|
|
920
921
|
|
|
921
|
-
const handleManifest = (
|
|
922
|
+
const handleManifest = (response, consent) => {
|
|
922
923
|
const providerPackages = getProvidersPackage();
|
|
923
924
|
const userId = handleGetUserId();
|
|
924
925
|
const executionContext = new Map();
|
|
926
|
+
const manifest = response.result;
|
|
925
927
|
manifest.forEach((provider) => {
|
|
926
928
|
addConfiguredTag(provider.package, provider.tagName);
|
|
927
929
|
addProviderVariable(provider.package, provider.variables, provider.tagName);
|
|
@@ -942,6 +944,7 @@
|
|
|
942
944
|
if (hasConsent) {
|
|
943
945
|
pkg.init({
|
|
944
946
|
userId,
|
|
947
|
+
session: response.session,
|
|
945
948
|
baseUrl: getUrl(),
|
|
946
949
|
manifest: provider,
|
|
947
950
|
sendTag,
|
|
@@ -999,7 +1002,7 @@
|
|
|
999
1002
|
saveConsent(result.consent);
|
|
1000
1003
|
}
|
|
1001
1004
|
setIsNewUSer(result.isNewUser);
|
|
1002
|
-
handleManifest(result
|
|
1005
|
+
handleManifest(result, consent || result.consent);
|
|
1003
1006
|
try {
|
|
1004
1007
|
window.dispatchEvent(new CustomEvent('edgetag-initialized', {
|
|
1005
1008
|
detail: {
|
|
@@ -1007,6 +1010,7 @@
|
|
|
1007
1010
|
isNewUser: result.isNewUser,
|
|
1008
1011
|
consent: result.consent,
|
|
1009
1012
|
consentSetting: result.consentSetting,
|
|
1013
|
+
session: result.session,
|
|
1010
1014
|
},
|
|
1011
1015
|
}));
|
|
1012
1016
|
}
|