@standhigher/besttrack-page-extension 0.5.9 → 0.5.10

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/dist/index.js +12 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -676,6 +676,7 @@ var POWERED_BY_HIDDEN_STORE_DOMAINS = /* @__PURE__ */ new Set([
676
676
  "nbstore-unlrgjwn.myshopify.com",
677
677
  "wavvveglobal.com"
678
678
  ]);
679
+ var TRACKING_PAGE_BOOTSTRAP_SCRIPT_ID = "besttrack-page-bootstrap";
679
680
  function getUrlParam2(params, key) {
680
681
  return params.get(key)?.trim() ?? "";
681
682
  }
@@ -685,11 +686,21 @@ var normalizeStoreDomain = (value) => {
685
686
  const host = trimmedValue.replace(/^[a-z][a-z\d+.-]*:\/\//i, "").replace(/^\/\//, "").split(/[/?#]/)[0].replace(/:\d+$/, "");
686
687
  return host.replace(/^www\./, "");
687
688
  };
689
+ function readBootstrapWatermarkRemoval(runtimeWindow) {
690
+ const raw = runtimeWindow.document?.getElementById?.(TRACKING_PAGE_BOOTSTRAP_SCRIPT_ID)?.textContent?.trim() ?? "";
691
+ if (!raw) return false;
692
+ try {
693
+ const parsed = JSON.parse(raw);
694
+ return parsed.enableTrackingPageWatermarkRemoval === true;
695
+ } catch {
696
+ return false;
697
+ }
698
+ }
688
699
  function shouldHidePoweredBy(targetWindow) {
689
700
  const runtimeWindow = targetWindow ?? (typeof window === "undefined" ? void 0 : window);
690
701
  if (!runtimeWindow) return false;
691
702
  const shopifyWindow = runtimeWindow;
692
- if (shopifyWindow.__BESTRACK__?.featureFlags?.enableTrackingPageWatermarkRemoval === true) {
703
+ if (shopifyWindow.__BESTRACK__?.featureFlags?.enableTrackingPageWatermarkRemoval === true || readBootstrapWatermarkRemoval(runtimeWindow)) {
693
704
  return true;
694
705
  }
695
706
  const searchParams = new URLSearchParams(runtimeWindow.location.search);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standhigher/besttrack-page-extension",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "BestTrack business extension entry point for @standhigher/puck-page-builder.",
5
5
  "type": "module",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "embla-carousel-autoplay": "^8.6.0",
24
24
  "embla-carousel-react": "^8.6.0",
25
- "@standhigher/puck-page-builder": "0.12.9"
25
+ "@standhigher/puck-page-builder": "0.12.10"
26
26
  },
27
27
  "devDependencies": {
28
28
  "tsup": "^8.5.1",