@blotoutio/edgetag-sdk-browser 0.10.11 → 0.10.13
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 +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
};
|
|
204
204
|
const getPageUrl = () => {
|
|
205
205
|
try {
|
|
206
|
-
if (window.edgetagData['pageUrl']) {
|
|
206
|
+
if (window.edgetagData && window.edgetagData['pageUrl']) {
|
|
207
207
|
return window.edgetagData['pageUrl'];
|
|
208
208
|
}
|
|
209
209
|
return window.location.href;
|
|
@@ -518,7 +518,7 @@
|
|
|
518
518
|
});
|
|
519
519
|
});
|
|
520
520
|
const getStandardPayload = (payload) => {
|
|
521
|
-
const data = Object.assign({ pageUrl: getPageUrl(), pageTitle: getPageTitle(), userAgent: getUserAgent(), referrer: getReferrer(), search: getSearch(), sdkVersion: "0.10.
|
|
521
|
+
const data = Object.assign({ pageUrl: getPageUrl(), pageTitle: getPageTitle(), userAgent: getUserAgent(), referrer: getReferrer(), search: getSearch(), sdkVersion: "0.10.13" }, (payload || {}));
|
|
522
522
|
let storage = {};
|
|
523
523
|
const session = getData$1('session');
|
|
524
524
|
if (session) {
|
|
@@ -662,7 +662,7 @@
|
|
|
662
662
|
userId,
|
|
663
663
|
eventName,
|
|
664
664
|
eventId,
|
|
665
|
-
data,
|
|
665
|
+
data: JSON.parse(JSON.stringify(data)),
|
|
666
666
|
sendTag,
|
|
667
667
|
manifestVariables: getProviderVariables(pkg.name),
|
|
668
668
|
});
|