@liiift-studio/sanity-visitor-insights 0.54.0 → 0.55.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 +16 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/studio/panels.test.tsx +44 -0
- package/src/studio/panels.tsx +43 -13
package/dist/index.js
CHANGED
|
@@ -2044,7 +2044,6 @@ function OverviewPanel({ data, previous, onBrush }) {
|
|
|
2044
2044
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2045
2045
|
ChartData,
|
|
2046
2046
|
{
|
|
2047
|
-
note: "A negative miss means GA4 counted more than Vercel that day \u2014 usually a tag firing twice, not extra traffic.",
|
|
2048
2047
|
label: "Show these figures as a table",
|
|
2049
2048
|
rows: data.crossSource ?? [],
|
|
2050
2049
|
rowKey: (d) => d.date,
|
|
@@ -2388,7 +2387,11 @@ function AcquisitionPanel({ data, previous }) {
|
|
|
2388
2387
|
filterOn: (row) => `${row.source} ${row.channel} ${row.medium ?? ""} ${row.campaign ?? ""}`,
|
|
2389
2388
|
filterPlaceholder: "Filter sources",
|
|
2390
2389
|
exportName: "traffic-sources",
|
|
2391
|
-
truncatedNote:
|
|
2390
|
+
truncatedNote: shortListNote(
|
|
2391
|
+
Boolean(data.rowsTruncated),
|
|
2392
|
+
Boolean(data.rowsWithheld),
|
|
2393
|
+
"For a foundry the tail of small design blogs is often the referral story."
|
|
2394
|
+
),
|
|
2392
2395
|
columns: [
|
|
2393
2396
|
{
|
|
2394
2397
|
key: "source",
|
|
@@ -2504,8 +2507,7 @@ function AcquisitionPanel({ data, previous }) {
|
|
|
2504
2507
|
" of those sales; the rest came from sources outside this list, so this column does not add up to the whole."
|
|
2505
2508
|
] })
|
|
2506
2509
|
] })
|
|
2507
|
-
] })
|
|
2508
|
-
data.rowsWithheld && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NoticeList, { notices: ["GA4 withheld some low-traffic rows for privacy, so this list is shorter than reality."] })
|
|
2510
|
+
] })
|
|
2509
2511
|
] });
|
|
2510
2512
|
}
|
|
2511
2513
|
function firstStepRate(steps) {
|
|
@@ -2530,6 +2532,11 @@ function spread(segments) {
|
|
|
2530
2532
|
if (ratio < RATIO) return null;
|
|
2531
2533
|
return `${worst.label} reaches the second step at ${formatPercent(worst.rate, 2)} against ${best.label}'s ${formatPercent(best.rate, 2)} \u2014 about ${Math.round(ratio)} times worse, on ${formatCount(worst.users)} visitors. The combined funnel above averages the two and describes neither.`;
|
|
2532
2534
|
}
|
|
2535
|
+
function shortListNote(truncated, withheld, tail) {
|
|
2536
|
+
if (!truncated && !withheld) return void 0;
|
|
2537
|
+
const cause = truncated && withheld ? "GA4 returned only its top rows, and withheld others with too few people to report" : truncated ? "GA4 returned only its top rows" : "GA4 withheld rows with too few people to report";
|
|
2538
|
+
return `${cause}, so this list is shorter than reality. ${tail}`;
|
|
2539
|
+
}
|
|
2533
2540
|
function JourneyPanel({ data }) {
|
|
2534
2541
|
const [segmentKey, setSegmentKey] = import_react4.default.useState(null);
|
|
2535
2542
|
const segments = data.segments ?? [];
|
|
@@ -2727,7 +2734,11 @@ function TypefaceInterestPanel({ data }) {
|
|
|
2727
2734
|
filterOn: (row) => row.typeface,
|
|
2728
2735
|
filterPlaceholder: "Filter typefaces",
|
|
2729
2736
|
exportName: "typeface-interest",
|
|
2730
|
-
truncatedNote:
|
|
2737
|
+
truncatedNote: shortListNote(
|
|
2738
|
+
Boolean(data.rowsTruncated),
|
|
2739
|
+
Boolean(data.rowsWithheld),
|
|
2740
|
+
"A family missing from this table has not necessarily gone quiet \u2014 and for a foundry the long tail is most of the catalogue."
|
|
2741
|
+
),
|
|
2731
2742
|
columns: [
|
|
2732
2743
|
{
|
|
2733
2744
|
key: "typeface",
|
|
@@ -2862,7 +2873,6 @@ function TypefaceInterestPanel({ data }) {
|
|
|
2862
2873
|
}
|
|
2863
2874
|
)
|
|
2864
2875
|
] }),
|
|
2865
|
-
data.rowsWithheld && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NoticeList, { notices: ["GA4 withheld some low-count rows for privacy. A family missing from this table has not necessarily gone quiet."] }),
|
|
2866
2876
|
data.revenueIsApportioned && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 0, muted: true, children: "Revenue is apportioned: an order covering several families or licences is split evenly between them, because the order documents carry no per-line value." })
|
|
2867
2877
|
] });
|
|
2868
2878
|
}
|