@liiift-studio/sanity-visitor-insights 0.62.0 → 0.63.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/dist/index.js CHANGED
@@ -2325,6 +2325,10 @@ function DataHealthPanel({ data, diagnostics }) {
2325
2325
  const pageviewMax = maxOf([data.ga4Pageviews, data.vercelPageviews]);
2326
2326
  const contained = isContainment(data.vercelPageviews, data.ga4Pageviews);
2327
2327
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_sanity_ui_compat3.Stack, { space: 4, children: [
2328
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Card, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_sanity_ui_compat3.Stack, { space: 2, children: [
2329
+ data.shortfallRatio !== null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, weight: "semibold", children: data.shortfallRatio >= 0 ? `GA4 saw ${formatPercent(data.shortfallRatio, 1)} fewer pageviews than Vercel` : `GA4 saw ${formatPercent(-data.shortfallRatio, 1)} more pageviews than Vercel` }),
2330
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, muted: true, children: data.interpretation })
2331
+ ] }) }),
2328
2332
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_sanity_ui_compat3.Stack, { space: 3, children: [
2329
2333
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SectionTitle, { title: "Pageviews, source against source" }),
2330
2334
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, muted: true, children: "Both counting pageviews. Google Analytics is blockable, so seeing fewer is normal." }),
@@ -2342,10 +2346,21 @@ function DataHealthPanel({ data, diagnostics }) {
2342
2346
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ComparisonBar, { label: "GA4 pageviews", metric: data.ga4Pageviews, max: pageviewMax })
2343
2347
  ] })
2344
2348
  ] }),
2345
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Card, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_sanity_ui_compat3.Stack, { space: 2, children: [
2346
- data.shortfallRatio !== null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, weight: "semibold", children: data.shortfallRatio >= 0 ? `GA4 saw ${formatPercent(data.shortfallRatio, 1)} fewer pageviews than Vercel` : `GA4 saw ${formatPercent(-data.shortfallRatio, 1)} more pageviews than Vercel` }),
2347
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, muted: true, children: data.interpretation })
2348
- ] }) }),
2349
+ diagnostics && /* Open, and primary. This is the longest block on the tab and the obvious candidate
2350
+ for folding away but the tab it sits on exists to answer "what should I fix
2351
+ before trusting any of this", and these checks ARE that answer. Folding it would
2352
+ have left Data health opening on a summary of the problem with the solution behind
2353
+ a click. It stays collapsible so a reader who has read it can get it out of the
2354
+ way. */
2355
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2356
+ Section,
2357
+ {
2358
+ title: "Configuration",
2359
+ subtitle: "What this site has wired up, and what it is missing.",
2360
+ collapsible: true,
2361
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DiagnosticsPanel, { data: diagnostics })
2362
+ }
2363
+ ),
2349
2364
  ((data.capture?.estimates?.length ?? 0) > 0 || data.estimatedSessions?.status === "estimated") && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_sanity_ui_compat3.Stack, { space: 3, children: [
2350
2365
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SectionTitle, { title: "How much GA4 is seeing" }),
2351
2366
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: cardGrid, children: (data.capture?.estimates ?? []).map((estimate) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Card, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_sanity_ui_compat3.Stack, { space: 3, children: [
@@ -2400,21 +2415,6 @@ function DataHealthPanel({ data, diagnostics }) {
2400
2415
  ] }) })
2401
2416
  ] })
2402
2417
  }
2403
- ),
2404
- diagnostics && /* Open, and primary. This is the longest block on the tab and the obvious candidate
2405
- for folding away — but the tab it sits on exists to answer "what should I fix
2406
- before trusting any of this", and these checks ARE that answer. Folding it would
2407
- have left Data health opening on a summary of the problem with the solution behind
2408
- a click. It stays collapsible so a reader who has read it can get it out of the
2409
- way. */
2410
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2411
- Section,
2412
- {
2413
- title: "Configuration",
2414
- subtitle: "What this site has wired up, and what it is missing.",
2415
- collapsible: true,
2416
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DiagnosticsPanel, { data: diagnostics })
2417
- }
2418
2418
  )
2419
2419
  ] });
2420
2420
  }