@blotoutio/edgetag-sdk-browser 1.14.0 → 1.16.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 +8 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -568,17 +568,21 @@
|
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
570
|
const getPageUrl = (destination) => {
|
|
571
|
+
const config = getSetting(destination, 'config');
|
|
572
|
+
let pageUrl = (config === null || config === void 0 ? void 0 : config.pageUrl) || '';
|
|
571
573
|
try {
|
|
572
574
|
// we need to leave this one in for existing Custom pixel customers
|
|
573
575
|
if (window.edgetagData && window.edgetagData['pageUrl']) {
|
|
574
576
|
return window.edgetagData['pageUrl'];
|
|
575
577
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
+
if (!pageUrl) {
|
|
579
|
+
pageUrl = window.location.href;
|
|
580
|
+
}
|
|
578
581
|
}
|
|
579
582
|
catch {
|
|
580
|
-
|
|
583
|
+
// do nothing
|
|
581
584
|
}
|
|
585
|
+
return pageUrl;
|
|
582
586
|
};
|
|
583
587
|
const getSearch = (destination) => {
|
|
584
588
|
try {
|
|
@@ -922,7 +926,7 @@
|
|
|
922
926
|
referrer: getReferrer(destination),
|
|
923
927
|
search: getSearch(destination),
|
|
924
928
|
locale: getLocale(),
|
|
925
|
-
sdkVersion: "1.
|
|
929
|
+
sdkVersion: "1.16.0" ,
|
|
926
930
|
...(payload || {}),
|
|
927
931
|
};
|
|
928
932
|
let storage = {};
|