@blotoutio/edgetag-sdk-browser 1.15.0 → 1.16.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.
Files changed (2) hide show
  1. package/index.js +8 -4
  2. 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
- const config = getSetting(destination, 'config');
577
- return (config === null || config === void 0 ? void 0 : config.pageUrl) || window.location.href;
578
+ if (!pageUrl) {
579
+ pageUrl = window.location.href;
580
+ }
578
581
  }
579
582
  catch {
580
- return '';
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.15.0" ,
929
+ sdkVersion: "1.16.1" ,
926
930
  ...(payload || {}),
927
931
  };
928
932
  let storage = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-browser",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "description": "Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",