@neowhale/storefront 0.2.60 → 0.2.62

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.
@@ -2997,6 +2997,7 @@ function LeadCaptureSection({ section, data, theme, onEvent }) {
2997
2997
  });
2998
2998
  }
2999
2999
  setStatus("success");
3000
+ onEvent?.("cta_click", { label: buttonText, source: c.source || "landing_page", landing_page_slug: slug || void 0 });
3000
3001
  onEvent?.("lead", { email, first_name: firstName || void 0, source: c.source || "landing_page", landing_page_slug: slug || void 0 });
3001
3002
  } catch (err) {
3002
3003
  setErrorMsg(err instanceof Error ? err.message : "Something went wrong. Please try again.");
@@ -3145,7 +3146,15 @@ function SuccessState({ theme, heading, message, couponCode, ctaText, ctaUrl })
3145
3146
  "button",
3146
3147
  {
3147
3148
  onClick: () => {
3148
- window.location.href = ctaUrl || "/shop";
3149
+ const dest = new URL(ctaUrl || "/shop", window.location.origin);
3150
+ const current = new URLSearchParams(window.location.search);
3151
+ for (const key of ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "fbclid", "gclid"]) {
3152
+ const val = current.get(key);
3153
+ if (val && !dest.searchParams.has(key)) dest.searchParams.set(key, val);
3154
+ }
3155
+ const vid = typeof localStorage !== "undefined" && localStorage.getItem("wt_vid");
3156
+ if (vid) dest.searchParams.set("wt_vid", vid);
3157
+ window.location.href = dest.toString();
3149
3158
  },
3150
3159
  style: {
3151
3160
  marginTop: "1.5rem",
@@ -3472,7 +3481,20 @@ function TrustBadgesSection({ section, theme }) {
3472
3481
  alignItems: "center",
3473
3482
  gap: "0.375rem"
3474
3483
  }, children: [
3475
- badge.icon && /* @__PURE__ */ jsx("span", { style: { fontSize: "0.9rem" }, children: badge.icon }),
3484
+ badge.icon && /* @__PURE__ */ jsx("span", { style: { fontSize: "0.9rem" }, children: {
3485
+ truck: "\u{1F69A}",
3486
+ flask: "\u{1F9EA}",
3487
+ map: "\u{1F5FA}\uFE0F",
3488
+ shield: "\u{1F6E1}\uFE0F",
3489
+ star: "\u2B50",
3490
+ check: "\u2713",
3491
+ lock: "\u{1F512}",
3492
+ heart: "\u2764\uFE0F",
3493
+ leaf: "\u{1F33F}",
3494
+ clock: "\u23F1\uFE0F",
3495
+ gift: "\u{1F381}",
3496
+ fire: "\u{1F525}"
3497
+ }[badge.icon] || badge.icon }),
3476
3498
  /* @__PURE__ */ jsx("span", { style: {
3477
3499
  fontSize: "0.7rem",
3478
3500
  fontWeight: 500,