@blotoutio/edgetag-sdk-js 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.cjs.js CHANGED
@@ -567,17 +567,21 @@ const getReferrer = (destination) => {
567
567
  }
568
568
  };
569
569
  const getPageUrl = (destination) => {
570
+ const config = getSetting(destination, 'config');
571
+ let pageUrl = (config === null || config === void 0 ? void 0 : config.pageUrl) || '';
570
572
  try {
571
573
  // we need to leave this one in for existing Custom pixel customers
572
574
  if (window.edgetagData && window.edgetagData['pageUrl']) {
573
575
  return window.edgetagData['pageUrl'];
574
576
  }
575
- const config = getSetting(destination, 'config');
576
- return (config === null || config === void 0 ? void 0 : config.pageUrl) || window.location.href;
577
+ if (!pageUrl) {
578
+ pageUrl = window.location.href;
579
+ }
577
580
  }
578
581
  catch {
579
- return '';
582
+ // do nothing
580
583
  }
584
+ return pageUrl;
581
585
  };
582
586
  const getSearch = (destination) => {
583
587
  try {
@@ -921,7 +925,7 @@ const getStandardPayload = (destination, payload) => {
921
925
  referrer: getReferrer(destination),
922
926
  search: getSearch(destination),
923
927
  locale: getLocale(),
924
- sdkVersion: "1.14.0" ,
928
+ sdkVersion: "1.16.0" ,
925
929
  ...(payload || {}),
926
930
  };
927
931
  let storage = {};
package/index.mjs CHANGED
@@ -565,17 +565,21 @@ const getReferrer = (destination) => {
565
565
  }
566
566
  };
567
567
  const getPageUrl = (destination) => {
568
+ const config = getSetting(destination, 'config');
569
+ let pageUrl = (config === null || config === void 0 ? void 0 : config.pageUrl) || '';
568
570
  try {
569
571
  // we need to leave this one in for existing Custom pixel customers
570
572
  if (window.edgetagData && window.edgetagData['pageUrl']) {
571
573
  return window.edgetagData['pageUrl'];
572
574
  }
573
- const config = getSetting(destination, 'config');
574
- return (config === null || config === void 0 ? void 0 : config.pageUrl) || window.location.href;
575
+ if (!pageUrl) {
576
+ pageUrl = window.location.href;
577
+ }
575
578
  }
576
579
  catch {
577
- return '';
580
+ // do nothing
578
581
  }
582
+ return pageUrl;
579
583
  };
580
584
  const getSearch = (destination) => {
581
585
  try {
@@ -919,7 +923,7 @@ const getStandardPayload = (destination, payload) => {
919
923
  referrer: getReferrer(destination),
920
924
  search: getSearch(destination),
921
925
  locale: getLocale(),
922
- sdkVersion: "1.14.0" ,
926
+ sdkVersion: "1.16.0" ,
923
927
  ...(payload || {}),
924
928
  };
925
929
  let storage = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-js",
3
- "version": "1.14.0",
3
+ "version": "1.16.0",
4
4
  "description": "JS SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",