@koda-sl/baker-cli 0.845.0 → 0.846.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/{ads-ZPBENENM.js → ads-47ISOFKG.js} +3 -3
- package/dist/{analytics-5QZJQI6Z.js → analytics-IXZHQ2ZZ.js} +56 -22
- package/dist/analytics-IXZHQ2ZZ.js.map +1 -0
- package/dist/{chunk-NT5X44IL.js → chunk-5TKGCYSU.js} +3 -3
- package/dist/{chunk-NT5X44IL.js.map → chunk-5TKGCYSU.js.map} +1 -1
- package/dist/{chunk-NRA7TZV7.js → chunk-LSNLFNDJ.js} +2 -2
- package/dist/{chunk-PC37FCEC.js → chunk-PNOKIJFM.js} +71 -5
- package/dist/chunk-PNOKIJFM.js.map +1 -0
- package/dist/{chunk-LKTBIO3F.js → chunk-SXZ537Q2.js} +2 -2
- package/dist/{chunk-2DVR6MUZ.js → chunk-V34Q2PYJ.js} +2 -2
- package/dist/{chunk-2GXFGP4M.js → chunk-ZWLYPZWW.js} +3 -3
- package/dist/cli.js +3 -3
- package/dist/{funnel-QCRI5TPO.js → funnel-UFYTP7LR.js} +3 -3
- package/dist/{google-IOBFFSRM.js → google-RX4QDXLD.js} +2 -2
- package/dist/{lookup-4W7ERA4E.js → lookup-VGSMSP7E.js} +4 -4
- package/dist/{performance-YM2U4GMU.js → performance-LYCO7VAB.js} +2 -2
- package/dist/{plan-VHLLCF4R.js → plan-JS42ZMCZ.js} +3 -3
- package/dist/{questionnaire-47DIYMVE.js → questionnaire-S7UADGOY.js} +3 -3
- package/dist/{sends-JPPZJUBN.js → sends-WF4IKUFF.js} +3 -3
- package/dist/{sources-Y75YRCNZ.js → sources-OVLH6OZ2.js} +4 -4
- package/dist/{unstage-K7RYZLA2.js → unstage-JZAIRBVA.js} +3 -3
- package/dist/{url-options-6ATRBK73.js → url-options-JK525H2M.js} +2 -2
- package/package.json +1 -1
- package/dist/analytics-5QZJQI6Z.js.map +0 -1
- package/dist/chunk-PC37FCEC.js.map +0 -1
- /package/dist/{ads-ZPBENENM.js.map → ads-47ISOFKG.js.map} +0 -0
- /package/dist/{chunk-NRA7TZV7.js.map → chunk-LSNLFNDJ.js.map} +0 -0
- /package/dist/{chunk-LKTBIO3F.js.map → chunk-SXZ537Q2.js.map} +0 -0
- /package/dist/{chunk-2DVR6MUZ.js.map → chunk-V34Q2PYJ.js.map} +0 -0
- /package/dist/{chunk-2GXFGP4M.js.map → chunk-ZWLYPZWW.js.map} +0 -0
- /package/dist/{funnel-QCRI5TPO.js.map → funnel-UFYTP7LR.js.map} +0 -0
- /package/dist/{google-IOBFFSRM.js.map → google-RX4QDXLD.js.map} +0 -0
- /package/dist/{lookup-4W7ERA4E.js.map → lookup-VGSMSP7E.js.map} +0 -0
- /package/dist/{performance-YM2U4GMU.js.map → performance-LYCO7VAB.js.map} +0 -0
- /package/dist/{plan-VHLLCF4R.js.map → plan-JS42ZMCZ.js.map} +0 -0
- /package/dist/{questionnaire-47DIYMVE.js.map → questionnaire-S7UADGOY.js.map} +0 -0
- /package/dist/{sends-JPPZJUBN.js.map → sends-WF4IKUFF.js.map} +0 -0
- /package/dist/{sources-Y75YRCNZ.js.map → sources-OVLH6OZ2.js.map} +0 -0
- /package/dist/{unstage-K7RYZLA2.js.map → unstage-JZAIRBVA.js.map} +0 -0
- /package/dist/{url-options-6ATRBK73.js.map → url-options-JK525H2M.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EVENT_PROPERTY_WITHHELD,
|
|
3
3
|
analyticsTimelineRowSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PNOKIJFM.js";
|
|
5
5
|
import {
|
|
6
6
|
formEventKey
|
|
7
7
|
} from "./chunk-KLO3TPTS.js";
|
|
@@ -261,7 +261,7 @@ function withheldBreakdownHint(data, asked) {
|
|
|
261
261
|
const events = isPlainRow(row) && typeof row.events === "number" ? row.events : 0;
|
|
262
262
|
if (events === 0) return [];
|
|
263
263
|
return [
|
|
264
|
-
`${events} ${asked.eventName} events are "${EVENT_PROPERTY_WITHHELD}": recorded from visitors who declined analytics consent (or while the site measures in aggregate), so they carry no visit and none of the page's own properties. They are real and count in every total; only their ${asked.property} is unknown. Report them as ${events} without consent, ${asked.property} unknown \u2014 not as a tracking fault, and not by reading the feed, which holds nothing more about them.`
|
|
264
|
+
`${events} ${asked.eventName} events are "${EVENT_PROPERTY_WITHHELD}": recorded from visitors who declined analytics consent (or while the site measures in aggregate), so they carry no visit of their own and none of the page's own properties: their visits are estimated (\`estimatedSessions\`). They are real and count in every total; only their ${asked.property} is unknown. Report them as ${events} without consent, ${asked.property} unknown \u2014 not as a tracking fault, and not by reading the feed, which holds nothing more about them.`
|
|
265
265
|
];
|
|
266
266
|
}
|
|
267
267
|
function narrowToBreakdown(data, asked, full) {
|
|
@@ -371,4 +371,4 @@ export {
|
|
|
371
371
|
serverFeedFields,
|
|
372
372
|
keepFeedFields
|
|
373
373
|
};
|
|
374
|
-
//# sourceMappingURL=chunk-
|
|
374
|
+
//# sourceMappingURL=chunk-5TKGCYSU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../api/src/analytics/flowEventKeys.ts","../src/commands/analytics/render.ts","../src/commands/analytics/fields.ts"],"sourcesContent":["/**\n * Every event a Form's own steps raise, built from the Form's tree.\n *\n * A Form published by Baker emits its events natively: every step raises the\n * triggers its node type has, and the Form raises `submit:<slug>` when it runs\n * out of steps. Nothing has to be registered for that to happen — no Source, no\n * conversion, no setting. But the lists a person or an agent PICKS an event\n * from are built from the event store, which knows an event only after somebody\n * has fired it. So a Form published five minutes ago offered nothing to pick,\n * and the only affordances left on the picker were \"type the name by hand\" and\n * \"add a Source\" — a door for a company's own systems, offered for an event a\n * Baker page already sends. Both of those are how a funnel step ends up wired\n * to a key that counts zero forever.\n *\n * This is the other half: the keys derived from the tree, offered at zero,\n * exactly as a Source is offered before its first send. Same builder\n * (`formEventKey`), same trigger table (`flowNodeTriggers`), so a key from here\n * and a key from the SQL are the same string.\n */\n\nimport { flowNodeTriggers } from \"../flowCatalog\";\nimport { formEventKey } from \"./eventKey\";\n\ntype AnyRecord = Record<string, unknown>;\n\nexport interface FlowEventKey {\n eventKey: string;\n /** `null` for the Form-level `submit:` key, which belongs to no step. */\n nodeId: string | null;\n nodeName: string;\n nodeType: string | null;\n triggerId: string | null;\n /** Whether this is the moment that step exists to produce. */\n isCompletion: boolean;\n}\n\n/** Every node of a Form tree, parents before children. */\nexport function flowNodes(node: unknown, acc: AnyRecord[] = []): AnyRecord[] {\n if (!node || typeof node !== \"object\") return acc;\n const record = node as AnyRecord;\n acc.push(record);\n if (Array.isArray(record.children)) for (const child of record.children) flowNodes(child, acc);\n return acc;\n}\n\n/**\n * Every event key this Form can produce, each step's completion first.\n *\n * Completion triggers lead because they are what a person means by \"reached\n * this step\"; the lifecycle triggers a widget also raises (\"the embedded form\n * finished loading\") follow rather than being hidden, since an embedded\n * checkout genuinely reports through one of them. The order says nothing about\n * which ending is the Form's outcome — that is the agent's call.\n */\nexport function flowEventKeys(tree: unknown, slug: string): FlowEventKey[] {\n const primary: FlowEventKey[] = [];\n const secondary: FlowEventKey[] = [];\n\n // A tree with no identified step raises nothing, and `submit:<slug>` for it\n // would be the very thing this file exists to prevent: a real-looking key\n // that counts zero for ever. It happens — a `_data.json` holding `null` or\n // `{}`, a folder a flow-builder loop created and has not finished writing.\n const nodes = flowNodes(tree).filter((node) => typeof node.id === \"string\" && node.id !== \"\");\n if (nodes.length === 0) return [];\n\n for (const node of nodes) {\n const id = node.id as string;\n const triggers = flowNodeTriggers(node.nodeData);\n for (const triggerId of triggers.available) {\n const candidate: FlowEventKey = {\n eventKey: formEventKey(slug, id, triggerId),\n nodeId: id,\n nodeName: typeof node.name === \"string\" ? node.name : id,\n nodeType: triggers.type,\n triggerId,\n isCompletion: triggers.completion === triggerId,\n };\n (candidate.isCompletion ? primary : secondary).push(candidate);\n }\n }\n\n return [\n ...primary,\n ...secondary,\n {\n eventKey: `submit:${slug}`,\n nodeId: null,\n nodeName: \"the Form ran out of steps\",\n nodeType: null,\n triggerId: null,\n // A Form reaching its last node is as primary as an outcome gets for a\n // Form with no widget in it — but it never fires on one that ends in a\n // booking widget or a redirect, so it does not lead the list.\n isCompletion: false,\n },\n ];\n}\n","/**\n * What the agent reads, as opposed to what the wire carries.\n *\n * The dashboard and the sandbox agent read the same `/api/analytics/query`\n * response and want different things out of it. A browser wants every field of\n * every row plus a sparkline it can draw; an agent pays for all of that in\n * context and cannot draw anything.\n *\n * Measured against the wire schema on a 40-landing site: `landings` came back\n * as ~11.5k tokens of pretty-printed JSON, a third of it indentation and half\n * of it sparkline. `landings --days 90 --granularity hour` came back as ~353k\n * tokens — the sparkline is bucketed by `--granularity`, so ninety days of\n * hours is 2,160 numbers per page — which is larger than the window it has to\n * fit inside. Nothing capped it and nothing warned about it.\n *\n * So the shaping happens here rather than in the endpoint: the wire keeps its\n * contract, the dashboard keeps its fields, and the agent gets the same answer\n * at roughly a tenth of the cost.\n */\n\nimport { type AnalyticsProjectedQueryData, EVENT_PROPERTY_WITHHELD } from \"@baker/api/analytics\";\n\n/**\n * How many points of a sparkline survive `--full`.\n *\n * A sparkline exists to carry a shape, and a shape survives resampling — thirty\n * points still say \"it collapsed in the third week\". The per-bucket counts are\n * not lost: `traffic --landing <id> --granularity hour` is the report that\n * answers at that resolution, and it answers for one page rather than for all\n * of them at once.\n */\nconst SPARKLINE_POINTS = 30;\n\n/** Fields no agent can act on, dropped before anything else is measured. */\nconst DASHBOARD_ONLY_FIELDS = new Set([\n // The Convex row id. It exists so a dashboard can link to the row; an agent\n // addresses a landing by `landingId`, which is the id in its `_definition.md`.\n \"landingRef\",\n]);\n\n/**\n * Blocks that are lists of things rather than breakdowns.\n *\n * Only these are paged, and only these are worth saying \"there are more\" about.\n */\nexport const ANALYTICS_LIST_BLOCKS = [\"deliveries\", \"submissions\", \"visitors\", \"timeline\", \"stream\"] as const;\n\n/**\n * A value carrying nothing a missing key would not carry.\n *\n * `null` is deliberately not in here. Every rate in this response is `null`\n * rather than `0` when it has no denominator, and the docs tell the agent to\n * read the two apart — so `null` is an answer and `\"\"` is an absence.\n * `0` and `false` are answers too.\n */\nfunction isAbsent(value: unknown): boolean {\n if (value === \"\") return true;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === \"object\" && value !== null) return Object.keys(value).length === 0;\n return false;\n}\n\n/**\n * A series resampled to at most `points`, by summing into equal buckets.\n *\n * Summing rather than sampling every nth point: these are counts, and dropping\n * four hours in five understates a day by four fifths while still drawing a\n * plausible line. A resampled series totals what the original totalled.\n */\nexport function resample(series: readonly number[], points: number): number[] {\n if (series.length <= points || points < 1) return [...series];\n const out: number[] = [];\n for (let i = 0; i < points; i += 1) {\n const from = Math.floor((i * series.length) / points);\n const to = Math.floor(((i + 1) * series.length) / points);\n let sum = 0;\n for (let j = from; j < to; j += 1) sum += series[j] ?? 0;\n out.push(sum);\n }\n return out;\n}\n\nfunction pruneValue(value: unknown, full: boolean): unknown {\n if (Array.isArray(value)) return value.map((entry) => pruneValue(entry, full));\n if (typeof value === \"object\" && value !== null) {\n return pruneRow(value as Record<string, unknown>, full);\n }\n return value;\n}\n\n/** One row with its absent fields and its dashboard-only fields removed. */\nfunction pruneRow(row: Record<string, unknown>, full: boolean): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(row)) {\n if (DASHBOARD_ONLY_FIELDS.has(key)) continue;\n if (key === \"sparkline\" && Array.isArray(value)) {\n // Dropped outright unless asked for: it is the one field here that is a\n // picture rather than a fact, and it is also the largest.\n if (!full) continue;\n out[key] = resample(value as number[], SPARKLINE_POINTS);\n continue;\n }\n if (isAbsent(value)) continue;\n out[key] = pruneValue(value, full);\n }\n return out;\n}\n\n/**\n * The response an agent should be handed.\n *\n * Per-row rather than per-column pruning, because the saving is in the rows\n * that differ: a replay row carries thirty-five fields of which a page view\n * fills eight, and dropping a column only when it is empty in *every* row would\n * keep all thirty-five on every one of them.\n */\nexport function pruneForAgent(data: AnalyticsProjectedQueryData, full: boolean): Record<string, unknown> {\n const pruned = pruneRow(data as unknown as Record<string, unknown>, full);\n // The one empty list kept: the list the report pages. Pruned, a failures-only\n // `delivery` with no failures read exactly like a report that left the block\n // out, and agents pulled every submission with --full to tell them apart.\n const paged = data.pageInfo?.block;\n if (paged !== undefined && Array.isArray(data[paged]) && !(paged in pruned)) pruned[paged] = [];\n return pruned;\n}\n\n// ---------------------------------------------------------------------------\n// Rendering\n// ---------------------------------------------------------------------------\n\n/** A row that can be a table line: every value is a scalar or a flat list. */\nfunction isTabular(rows: readonly unknown[]): rows is ReadonlyArray<Record<string, unknown>> {\n return rows.every(\n (row) =>\n typeof row === \"object\" &&\n row !== null &&\n !Array.isArray(row) &&\n Object.values(row).every(\n (value) =>\n value === null ||\n typeof value !== \"object\" ||\n (Array.isArray(value) && value.every((e) => typeof e !== \"object\")),\n ),\n );\n}\n\nfunction cell(value: unknown, key?: string): string {\n if (value === null || value === undefined) return \"\";\n if (Array.isArray(value)) return value.join(\" \");\n if (typeof value === \"number\" && !Number.isInteger(value)) {\n // A duration in milliseconds to four decimal places is four digits of\n // noise: nothing downstream is sensitive to a microsecond of dwell time,\n // and every one of them is a character the reader pays for.\n if (key?.endsWith(\"Ms\")) return String(Math.round(value));\n return value.toFixed(4).replace(/0+$/, \"\").replace(/\\.$/, \"\");\n }\n return String(value);\n}\n\n/**\n * Columns that say *which row this is*, before the ones that say how it did.\n *\n * Needed because the keys do not arrive in the order the wire declares them —\n * they come back alphabetised, which buries `landingId` and `name` in the\n * middle of a table and leads with `avgEngagementMs`. A table whose first\n * column is not the subject has to be read twice.\n */\nconst IDENTITY_COLUMNS = [\n \"landingId\",\n \"name\",\n \"slug\",\n \"path\",\n \"flowSlug\",\n \"stepId\",\n \"value\",\n \"key\",\n \"bucket\",\n \"tag\",\n \"eventName\",\n \"release\",\n \"place\",\n \"bot\",\n \"source\",\n \"medium\",\n \"campaign\",\n \"platform\",\n \"sessionId\",\n \"eventId\",\n];\n\nfunction byIdentityFirst(a: string, b: string): number {\n const ia = IDENTITY_COLUMNS.indexOf(a);\n const ib = IDENTITY_COLUMNS.indexOf(b);\n if (ia !== -1 || ib !== -1)\n return (ia === -1 ? Number.MAX_SAFE_INTEGER : ia) - (ib === -1 ? Number.MAX_SAFE_INTEGER : ib);\n return 0;\n}\n\n/**\n * Blocks in the order a report is read: the window it covers, the totals, the\n * rows, and the echo of which preset produced it last of all. An `events`\n * breakdown or funnel leads, because it is what `--event --property` or\n * `--steps` asked for, and a reader cut off by `| head` must still see it.\n */\nconst BLOCK_ORDER = [\"eventBreakdown\", \"customFunnel\", \"window\", \"totals\", \"previous\", \"pageInfo\"];\n\nfunction byBlockOrder(a: string, b: string): number {\n const rank = (key: string) => {\n const at = BLOCK_ORDER.indexOf(key);\n if (at !== -1) return at;\n return key === \"preset\" ? BLOCK_ORDER.length + 1 : BLOCK_ORDER.length;\n };\n return rank(a) - rank(b);\n}\n\n/**\n * Columns, in the order the wire declares them, minus the ones no row filled.\n *\n * Per-column here where the JSON path prunes per-row: a table with a ragged\n * row is not a table, and a column of empty cells costs the header once rather\n * than once per row.\n */\nfunction columnsOf(rows: ReadonlyArray<Record<string, unknown>>): string[] {\n const seen: string[] = [];\n for (const row of rows) {\n for (const key of Object.keys(row)) {\n if (!seen.includes(key)) seen.push(key);\n }\n }\n return seen\n .filter((key) => rows.some((row) => !isAbsent(row[key]) && row[key] !== null && row[key] !== undefined))\n .sort(byIdentityFirst);\n}\n\nfunction table(rows: ReadonlyArray<Record<string, unknown>>): string {\n const cols = columnsOf(rows);\n if (cols.length === 0) return \"\";\n const head = `| ${cols.join(\" | \")} |`;\n const rule = `| ${cols.map(() => \"---\").join(\" | \")} |`;\n const body = rows.map((row) => `| ${cols.map((col) => cell(row[col], col)).join(\" | \")} |`);\n return [head, rule, ...body].join(\"\\n\");\n}\n\n/** A value that is a list of rows, i.e. a sub-table rather than a cell. */\nfunction isRowList(value: unknown): value is Array<Record<string, unknown>> {\n return (\n Array.isArray(value) &&\n value.length > 0 &&\n value.every((entry) => typeof entry === \"object\" && entry !== null && !Array.isArray(entry))\n );\n}\n\n/** Whatever names this row in a heading — its id, its slug, or its position. */\nfunction labelOf(row: Record<string, unknown>, index: number): string {\n for (const key of IDENTITY_COLUMNS) {\n const value = row[key];\n if (typeof value === \"string\" && value !== \"\") return value;\n }\n return `#${index + 1}`;\n}\n\n/**\n * A block whose rows carry nested rows of their own — a funnel and its steps.\n *\n * Rendered as the parent table followed by one sub-table per parent rather than\n * dumped as JSON. The JSON fallback was correct and nearly useless: `funnel`,\n * `flow` and `overview` all nest, they are the three commands most likely to be\n * the *first* call of a turn, and for them `--output md` was saving about 2%.\n */\nfunction nestedBlock(name: string, rows: ReadonlyArray<Record<string, unknown>>): string {\n const parents = rows.map((row) =>\n Object.fromEntries(Object.entries(row).filter(([, value]) => !isRowList(value) && !isPlainRow(value))),\n );\n const parts = [`### ${name}`, table(parents)];\n rows.forEach((row, index) => {\n for (const [key, value] of Object.entries(row)) {\n if (isRowList(value)) parts.push(`#### ${name}[${labelOf(row, index)}].${key}`, table(value));\n else if (isPlainRow(value)) parts.push(`#### ${name}[${labelOf(row, index)}].${key}`, table([value]));\n }\n });\n return parts.filter((part) => part !== \"\").join(\"\\n\");\n}\n\n/** An object that is one row rather than a list — `worstStep`. */\nfunction isPlainRow(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction block(name: string, value: unknown): string {\n if (Array.isArray(value)) {\n if (value.length === 0) return \"\";\n if (isTabular(value)) return `### ${name}\\n${table(value)}`;\n if (isRowList(value)) return nestedBlock(name, value);\n return `### ${name}\\n${JSON.stringify(value)}`;\n }\n if (typeof value === \"object\" && value !== null) {\n const entries = Object.entries(value as Record<string, unknown>);\n if (entries.length === 0) return \"\";\n if (entries.every(([, v]) => v === null || typeof v !== \"object\")) {\n return `### ${name}\\n${entries.map(([k, v]) => `- ${k}: ${v === null ? \"null\" : cell(v, k)}`).join(\"\\n\")}`;\n }\n return `### ${name}\\n${JSON.stringify(value)}`;\n }\n return `### ${name}\\n${cell(value)}`;\n}\n\n/**\n * The whole response as Markdown.\n *\n * A fifth to a half smaller than the compact JSON, because a\n * table names each column once instead of once per row. `warnings` and `hints`\n * lead rather than trail: they are instructions to the reader, and a reader\n * that has already summarised the table below them has acted without them.\n */\nexport function renderMarkdown(envelope: {\n data: Record<string, unknown>;\n warnings?: ReadonlyArray<{ code: string; message: string }>;\n hints?: readonly string[];\n}): string {\n const parts: string[] = [];\n for (const warning of envelope.warnings ?? []) parts.push(`> **${warning.code}** — ${warning.message}`);\n for (const hint of envelope.hints ?? []) parts.push(`> ${hint}`);\n for (const [name, value] of Object.entries(envelope.data).sort(([a], [b]) => byBlockOrder(a, b))) {\n const rendered = block(name, value);\n if (rendered !== \"\") parts.push(rendered);\n }\n return `${parts.join(\"\\n\\n\")}\\n`;\n}\n\n/**\n * An `--event` read that came back empty, said as what was empty.\n *\n * The event list is narrowed to the `--event` asked for, so an absent row\n * means the event had no rows in this window, and a present one with an empty\n * `eventBreakdown` means the `--property` (or `--where`) split it into nothing.\n * Calling the second \"that event does not exist\" — beside a list naming it —\n * is the contradiction BAKER-3379 recorded.\n */\nexport function missingBreakdownHint(\n data: Record<string, unknown>,\n asked: { eventName?: string; property?: string },\n): string[] {\n if (asked.eventName === undefined) return [];\n const listed = Array.isArray(data.customEvents)\n ? data.customEvents.find((row) => isPlainRow(row) && row.eventName === asked.eventName)\n : undefined;\n if (listed === undefined) {\n return [\n `No ${asked.eventName} events in this window. Run \\`baker analytics events\\` without --event for the names these pages send, or widen --days.`,\n ];\n }\n if (asked.property === undefined) return [];\n const breakdown = data.eventBreakdown;\n if (Array.isArray(breakdown) && breakdown.length > 0) return [];\n const keys = Array.isArray(listed.propertyKeys) ? listed.propertyKeys.join(\", \") : \"\";\n return [\n `${asked.eventName} has events in this window, but --property ${asked.property} split them into no rows (with --where, the filter matched none)${keys === \"\" ? \"\" : `. Its property keys: ${keys}`}.`,\n ];\n}\n\n/**\n * What the `(no consent)` row of a breakdown is, said before anyone goes\n * looking for a tracking fault in it.\n *\n * Its events are real and its session count is zero by construction: the\n * collector kept the event and dropped who it was, the page's own properties\n * with it. Unexplained, an agent paged the raw feed seven times and wrote three\n * scripts to find that out (BAKER-3791).\n */\nexport function withheldBreakdownHint(\n data: Record<string, unknown>,\n asked: { eventName?: string; property?: string },\n): string[] {\n if (asked.eventName === undefined || asked.property === undefined || !Array.isArray(data.eventBreakdown)) return [];\n const row = data.eventBreakdown.find((entry) => isPlainRow(entry) && entry.value === EVENT_PROPERTY_WITHHELD);\n const events = isPlainRow(row) && typeof row.events === \"number\" ? row.events : 0;\n if (events === 0) return [];\n return [\n `${events} ${asked.eventName} events are \"${EVENT_PROPERTY_WITHHELD}\": recorded from visitors who declined analytics consent (or while the site measures in aggregate), so they carry no visit and none of the page's own properties. They are real and count in every total; only their ${asked.property} is unknown. Report them as ${events} without consent, ${asked.property} unknown — not as a tracking fault, and not by reading the feed, which holds nothing more about them.`,\n ];\n}\n\n/**\n * `--event X --property Y` without `--full`: the breakdown asked for and the\n * window it covers, nothing site-wide.\n *\n * The totals and the event list answer a different question, and printed\n * beside the breakdown they pushed it past a `| head` and tripled what one\n * read cost (BAKER-2546). `--full` keeps them. Applied after the hints are\n * read, which still need the event list to say whether the event was there.\n */\nexport function narrowToBreakdown(\n data: Record<string, unknown>,\n asked: { eventName?: string; property?: string },\n full: boolean,\n): void {\n if (full || asked.eventName === undefined || asked.property === undefined) return;\n delete data.customEvents;\n delete data.totals;\n delete data.previous;\n}\n\n/**\n * `submissions --by-field` prints the answers and their window. The server\n * never reads the list of attempts for it; the site's traffic totals beside it\n * count something else, so they stay behind `--full`.\n */\nexport function narrowToAnswers(data: Record<string, unknown>, answerField: string | undefined, full: boolean): void {\n if (full || answerField === undefined) return;\n delete data.totals;\n delete data.previous;\n}\n\n/** The blocks that are a per-bucket series, which `--granularity` shapes. */\nconst SERIES_BLOCKS = [\"trend\", \"eventTrend\", \"customFunnelTrend\", \"flowTrend\", \"landings\"];\n\n/**\n * `--granularity` on a report that returned no series.\n *\n * The flag is shared by every report, and only a few have buckets to shape;\n * the rest accept it and change nothing, which read as \"no trend exists\" and\n * sent agents into one call per day (BAKER-2549, BAKER-924).\n */\nexport function noSeriesHint(\n data: Record<string, unknown>,\n granularity: string | undefined,\n warnings: readonly { code: string }[] = [],\n): string[] {\n if (granularity === undefined) return [];\n if (SERIES_BLOCKS.some((key) => key in data)) return [];\n // A series left out for size carries its own warning, which says why.\n if (warnings.some((warning) => warning.code === \"SERIES_CAPPED\")) return [];\n return [\n `--granularity ${granularity} shaped nothing: this report returned no per-bucket series. One comes with --full from overview, traffic or page (trend), events (eventTrend per event, --event <name> for one; customFunnelTrend with --steps) and flow (flowTrend per Form, --flow <slug> for one), narrowed with --landing, --platform or --role/--value like any report.`,\n ];\n}\n\n/** The formats this family renders. */\nexport const ANALYTICS_OUTPUT_FORMATS = [\"json\", \"md\"] as const;\n\n/**\n * Whether a `--output` value is one we render.\n *\n * Checked rather than defaulted, because the near-misses are the plausible\n * guesses — `markdown`, `table`, `csv` — and every one of them used to fall\n * through to JSON silently. An agent that asked for the cheap format, was\n * handed the expensive one, and was told nothing has no way to notice.\n */\nexport function isAnalyticsOutputFormat(value: string): boolean {\n return (ANALYTICS_OUTPUT_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Write the report.\n *\n * JSON stays the default and stays the envelope every other family returns, but\n * it is emitted compact. It used to go through the shared pretty-printer, which\n * indents two spaces per level — measured at a third to a half of the bytes of\n * every analytics response, spent on whitespace the reader gains nothing from.\n */\nexport function writeAnalyticsReport(\n envelope: {\n ok: true;\n data: Record<string, unknown>;\n warnings?: ReadonlyArray<{ code: string; message: string }>;\n hints?: readonly string[];\n },\n format: string,\n): void {\n if (format === \"md\") {\n process.stdout.write(renderMarkdown(envelope));\n return;\n }\n process.stdout.write(`${JSON.stringify(envelope)}\\n`);\n}\n\n/**\n * Above this many rows in one response, the format is worth a sentence.\n *\n * A flag nobody knows about is a flag nobody passes. The saving is real —\n * measured at 70% on a hundred-row keyword breakdown — but it only ever\n * happens on the second call, so the first one has to say so.\n */\nconst ROWS_BEFORE_FORMAT_HINT = 25;\n\n/** How many rows the response carries, across every block that is a list. */\nexport function rowCount(data: Record<string, unknown>): number {\n let total = 0;\n for (const value of Object.values(data)) {\n if (Array.isArray(value)) total += value.length;\n }\n return total;\n}\n\n/** Told once, when it would have mattered, and never on a report already in Markdown. */\nexport function formatHint(data: Record<string, unknown>, format: string): string[] {\n if (format === \"md\") return [];\n const rows = rowCount(data);\n if (rows < ROWS_BEFORE_FORMAT_HINT) return [];\n return [\n \"This report is long. If you are going to read the numbers rather than pick one field out of them, --output md returns the same answer as tables, typically a third to a half smaller.\",\n ];\n}\n","/**\n * `--fields`: the columns of a report the agent is going to read, and no others.\n *\n * A feed row is ~1.1 KB as stored and a per-visitor pass reads six short\n * strings of it; a landings row is eighteen columns and an agent cutting one\n * out of the printed table with `cut -d'|'` took the column beside it. Naming\n * the columns is cheaper than either and cannot pick the wrong one.\n *\n * A report is narrowed as the CLI's own `--fields` mask narrows any envelope\n * (`field-mask.ts`). On the feed the server projects too, so a page is a few\n * hundred bytes and may hold 1000 rows.\n */\n\nimport { analyticsTimelineRowSchema } from \"@baker/api/analytics\";\nimport { pickRow } from \"../../field-mask.ts\";\n\n/** Keys the feed adds on its way out rather than reading from the store. */\nconst DERIVED_FEED_FIELDS: Readonly<Record<string, readonly string[]>> = {\n destination: [\"sideEffectType\"],\n matchedBy: [\"userData\"],\n eventKind: [\"sideEffectName\"],\n};\n\n/**\n * What the feed's own reading needs from every row, asked for whatever was\n * requested: the held-back rows are recognised by `eventType` and `triggerId`,\n * and the hints read the upload's `eventId` and a searched person's terms.\n */\nconst FEED_SHAPING_FIELDS = [\"eventType\", \"triggerId\", \"sideEffectType\", \"eventId\", \"personTerms\"];\n\n/** Every column a feed row can carry. */\nexport const FEED_COLUMNS: readonly string[] = [\n ...Object.keys(analyticsTimelineRowSchema.shape),\n ...Object.keys(DERIVED_FEED_FIELDS),\n];\n\n/** The `--fields` list, or undefined when it was not given. */\nexport function parseFields(raw: unknown): string[] | undefined {\n if (raw === undefined || raw === true || raw === false) return undefined;\n const fields = [\n ...new Set(\n String(raw)\n .split(\",\")\n .map((field) => field.trim())\n .filter((field) => field !== \"\"),\n ),\n ];\n return fields.length > 0 ? fields : undefined;\n}\n\n/**\n * The keys the server keeps on each feed row: the asked-for ones (a dotted\n * `properties.utm_source` reads inside `properties`), and what the feed itself reads.\n */\nexport function serverFeedFields(fields: readonly string[]): string[] {\n const stored = fields.flatMap((field) => {\n const head = field.split(\".\")[0] ?? field;\n return DERIVED_FEED_FIELDS[head] ?? [head];\n });\n return [...new Set([...stored, ...FEED_SHAPING_FIELDS])];\n}\n\n/**\n * The feed's rows with only the asked-for keys, every row, whichever were\n * empty: the keys the server kept for the feed's own reading are not the\n * agent's. Hints name a column the feed does not have, and one that is empty\n * on every row of this page, so neither reads as the other.\n */\nexport function keepFeedFields(\n rows: readonly Record<string, unknown>[],\n fields: string[],\n): { rows: Record<string, unknown>[]; hints: string[] } {\n const kept = rows.map((row) => pickRow(row, fields));\n const unknown = fields.filter((field) => !FEED_COLUMNS.includes(field.split(\".\")[0] ?? field));\n const empty = fields.filter((field) => !unknown.includes(field) && !kept.some((row) => field in row));\n const hints = [\n ...(unknown.length > 0\n ? [\n `--fields ${unknown.join(\", \")}: not a feed column. A misspelling? The columns: ${[...FEED_COLUMNS].sort().join(\", \")}.`,\n ]\n : []),\n ...(empty.length > 0 && kept.length > 0 ? [`--fields ${empty.join(\", \")}: empty on every row of this page.`] : []),\n ];\n return { rows: kept, hints };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCO,SAAS,UAAU,MAAe,MAAmB,CAAC,GAAgB;AAC3E,MAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,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AAoD,CAAC,GAAG,YAAY,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;AAAA,IACvH,IACA,CAAC;AAAA,IACL,GAAI,MAAM,SAAS,KAAK,KAAK,SAAS,IAAI,CAAC,YAAY,MAAM,KAAK,IAAI,CAAC,oCAAoC,IAAI,CAAC;AAAA,EAClH;AACA,SAAO,EAAE,MAAM,MAAM,MAAM;AAC7B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../api/src/analytics/flowEventKeys.ts","../src/commands/analytics/render.ts","../src/commands/analytics/fields.ts"],"sourcesContent":["/**\n * Every event a Form's own steps raise, built from the Form's tree.\n *\n * A Form published by Baker emits its events natively: every step raises the\n * triggers its node type has, and the Form raises `submit:<slug>` when it runs\n * out of steps. Nothing has to be registered for that to happen — no Source, no\n * conversion, no setting. But the lists a person or an agent PICKS an event\n * from are built from the event store, which knows an event only after somebody\n * has fired it. So a Form published five minutes ago offered nothing to pick,\n * and the only affordances left on the picker were \"type the name by hand\" and\n * \"add a Source\" — a door for a company's own systems, offered for an event a\n * Baker page already sends. Both of those are how a funnel step ends up wired\n * to a key that counts zero forever.\n *\n * This is the other half: the keys derived from the tree, offered at zero,\n * exactly as a Source is offered before its first send. Same builder\n * (`formEventKey`), same trigger table (`flowNodeTriggers`), so a key from here\n * and a key from the SQL are the same string.\n */\n\nimport { flowNodeTriggers } from \"../flowCatalog\";\nimport { formEventKey } from \"./eventKey\";\n\ntype AnyRecord = Record<string, unknown>;\n\nexport interface FlowEventKey {\n eventKey: string;\n /** `null` for the Form-level `submit:` key, which belongs to no step. */\n nodeId: string | null;\n nodeName: string;\n nodeType: string | null;\n triggerId: string | null;\n /** Whether this is the moment that step exists to produce. */\n isCompletion: boolean;\n}\n\n/** Every node of a Form tree, parents before children. */\nexport function flowNodes(node: unknown, acc: AnyRecord[] = []): AnyRecord[] {\n if (!node || typeof node !== \"object\") return acc;\n const record = node as AnyRecord;\n acc.push(record);\n if (Array.isArray(record.children)) for (const child of record.children) flowNodes(child, acc);\n return acc;\n}\n\n/**\n * Every event key this Form can produce, each step's completion first.\n *\n * Completion triggers lead because they are what a person means by \"reached\n * this step\"; the lifecycle triggers a widget also raises (\"the embedded form\n * finished loading\") follow rather than being hidden, since an embedded\n * checkout genuinely reports through one of them. The order says nothing about\n * which ending is the Form's outcome — that is the agent's call.\n */\nexport function flowEventKeys(tree: unknown, slug: string): FlowEventKey[] {\n const primary: FlowEventKey[] = [];\n const secondary: FlowEventKey[] = [];\n\n // A tree with no identified step raises nothing, and `submit:<slug>` for it\n // would be the very thing this file exists to prevent: a real-looking key\n // that counts zero for ever. It happens — a `_data.json` holding `null` or\n // `{}`, a folder a flow-builder loop created and has not finished writing.\n const nodes = flowNodes(tree).filter((node) => typeof node.id === \"string\" && node.id !== \"\");\n if (nodes.length === 0) return [];\n\n for (const node of nodes) {\n const id = node.id as string;\n const triggers = flowNodeTriggers(node.nodeData);\n for (const triggerId of triggers.available) {\n const candidate: FlowEventKey = {\n eventKey: formEventKey(slug, id, triggerId),\n nodeId: id,\n nodeName: typeof node.name === \"string\" ? node.name : id,\n nodeType: triggers.type,\n triggerId,\n isCompletion: triggers.completion === triggerId,\n };\n (candidate.isCompletion ? primary : secondary).push(candidate);\n }\n }\n\n return [\n ...primary,\n ...secondary,\n {\n eventKey: `submit:${slug}`,\n nodeId: null,\n nodeName: \"the Form ran out of steps\",\n nodeType: null,\n triggerId: null,\n // A Form reaching its last node is as primary as an outcome gets for a\n // Form with no widget in it — but it never fires on one that ends in a\n // booking widget or a redirect, so it does not lead the list.\n isCompletion: false,\n },\n ];\n}\n","/**\n * What the agent reads, as opposed to what the wire carries.\n *\n * The dashboard and the sandbox agent read the same `/api/analytics/query`\n * response and want different things out of it. A browser wants every field of\n * every row plus a sparkline it can draw; an agent pays for all of that in\n * context and cannot draw anything.\n *\n * Measured against the wire schema on a 40-landing site: `landings` came back\n * as ~11.5k tokens of pretty-printed JSON, a third of it indentation and half\n * of it sparkline. `landings --days 90 --granularity hour` came back as ~353k\n * tokens — the sparkline is bucketed by `--granularity`, so ninety days of\n * hours is 2,160 numbers per page — which is larger than the window it has to\n * fit inside. Nothing capped it and nothing warned about it.\n *\n * So the shaping happens here rather than in the endpoint: the wire keeps its\n * contract, the dashboard keeps its fields, and the agent gets the same answer\n * at roughly a tenth of the cost.\n */\n\nimport { type AnalyticsProjectedQueryData, EVENT_PROPERTY_WITHHELD } from \"@baker/api/analytics\";\n\n/**\n * How many points of a sparkline survive `--full`.\n *\n * A sparkline exists to carry a shape, and a shape survives resampling — thirty\n * points still say \"it collapsed in the third week\". The per-bucket counts are\n * not lost: `traffic --landing <id> --granularity hour` is the report that\n * answers at that resolution, and it answers for one page rather than for all\n * of them at once.\n */\nconst SPARKLINE_POINTS = 30;\n\n/** Fields no agent can act on, dropped before anything else is measured. */\nconst DASHBOARD_ONLY_FIELDS = new Set([\n // The Convex row id. It exists so a dashboard can link to the row; an agent\n // addresses a landing by `landingId`, which is the id in its `_definition.md`.\n \"landingRef\",\n]);\n\n/**\n * Blocks that are lists of things rather than breakdowns.\n *\n * Only these are paged, and only these are worth saying \"there are more\" about.\n */\nexport const ANALYTICS_LIST_BLOCKS = [\"deliveries\", \"submissions\", \"visitors\", \"timeline\", \"stream\"] as const;\n\n/**\n * A value carrying nothing a missing key would not carry.\n *\n * `null` is deliberately not in here. Every rate in this response is `null`\n * rather than `0` when it has no denominator, and the docs tell the agent to\n * read the two apart — so `null` is an answer and `\"\"` is an absence.\n * `0` and `false` are answers too.\n */\nfunction isAbsent(value: unknown): boolean {\n if (value === \"\") return true;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === \"object\" && value !== null) return Object.keys(value).length === 0;\n return false;\n}\n\n/**\n * A series resampled to at most `points`, by summing into equal buckets.\n *\n * Summing rather than sampling every nth point: these are counts, and dropping\n * four hours in five understates a day by four fifths while still drawing a\n * plausible line. A resampled series totals what the original totalled.\n */\nexport function resample(series: readonly number[], points: number): number[] {\n if (series.length <= points || points < 1) return [...series];\n const out: number[] = [];\n for (let i = 0; i < points; i += 1) {\n const from = Math.floor((i * series.length) / points);\n const to = Math.floor(((i + 1) * series.length) / points);\n let sum = 0;\n for (let j = from; j < to; j += 1) sum += series[j] ?? 0;\n out.push(sum);\n }\n return out;\n}\n\nfunction pruneValue(value: unknown, full: boolean): unknown {\n if (Array.isArray(value)) return value.map((entry) => pruneValue(entry, full));\n if (typeof value === \"object\" && value !== null) {\n return pruneRow(value as Record<string, unknown>, full);\n }\n return value;\n}\n\n/** One row with its absent fields and its dashboard-only fields removed. */\nfunction pruneRow(row: Record<string, unknown>, full: boolean): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(row)) {\n if (DASHBOARD_ONLY_FIELDS.has(key)) continue;\n if (key === \"sparkline\" && Array.isArray(value)) {\n // Dropped outright unless asked for: it is the one field here that is a\n // picture rather than a fact, and it is also the largest.\n if (!full) continue;\n out[key] = resample(value as number[], SPARKLINE_POINTS);\n continue;\n }\n if (isAbsent(value)) continue;\n out[key] = pruneValue(value, full);\n }\n return out;\n}\n\n/**\n * The response an agent should be handed.\n *\n * Per-row rather than per-column pruning, because the saving is in the rows\n * that differ: a replay row carries thirty-five fields of which a page view\n * fills eight, and dropping a column only when it is empty in *every* row would\n * keep all thirty-five on every one of them.\n */\nexport function pruneForAgent(data: AnalyticsProjectedQueryData, full: boolean): Record<string, unknown> {\n const pruned = pruneRow(data as unknown as Record<string, unknown>, full);\n // The one empty list kept: the list the report pages. Pruned, a failures-only\n // `delivery` with no failures read exactly like a report that left the block\n // out, and agents pulled every submission with --full to tell them apart.\n const paged = data.pageInfo?.block;\n if (paged !== undefined && Array.isArray(data[paged]) && !(paged in pruned)) pruned[paged] = [];\n return pruned;\n}\n\n// ---------------------------------------------------------------------------\n// Rendering\n// ---------------------------------------------------------------------------\n\n/** A row that can be a table line: every value is a scalar or a flat list. */\nfunction isTabular(rows: readonly unknown[]): rows is ReadonlyArray<Record<string, unknown>> {\n return rows.every(\n (row) =>\n typeof row === \"object\" &&\n row !== null &&\n !Array.isArray(row) &&\n Object.values(row).every(\n (value) =>\n value === null ||\n typeof value !== \"object\" ||\n (Array.isArray(value) && value.every((e) => typeof e !== \"object\")),\n ),\n );\n}\n\nfunction cell(value: unknown, key?: string): string {\n if (value === null || value === undefined) return \"\";\n if (Array.isArray(value)) return value.join(\" \");\n if (typeof value === \"number\" && !Number.isInteger(value)) {\n // A duration in milliseconds to four decimal places is four digits of\n // noise: nothing downstream is sensitive to a microsecond of dwell time,\n // and every one of them is a character the reader pays for.\n if (key?.endsWith(\"Ms\")) return String(Math.round(value));\n return value.toFixed(4).replace(/0+$/, \"\").replace(/\\.$/, \"\");\n }\n return String(value);\n}\n\n/**\n * Columns that say *which row this is*, before the ones that say how it did.\n *\n * Needed because the keys do not arrive in the order the wire declares them —\n * they come back alphabetised, which buries `landingId` and `name` in the\n * middle of a table and leads with `avgEngagementMs`. A table whose first\n * column is not the subject has to be read twice.\n */\nconst IDENTITY_COLUMNS = [\n \"landingId\",\n \"name\",\n \"slug\",\n \"path\",\n \"flowSlug\",\n \"stepId\",\n \"value\",\n \"key\",\n \"bucket\",\n \"tag\",\n \"eventName\",\n \"release\",\n \"place\",\n \"bot\",\n \"source\",\n \"medium\",\n \"campaign\",\n \"platform\",\n \"sessionId\",\n \"eventId\",\n];\n\nfunction byIdentityFirst(a: string, b: string): number {\n const ia = IDENTITY_COLUMNS.indexOf(a);\n const ib = IDENTITY_COLUMNS.indexOf(b);\n if (ia !== -1 || ib !== -1)\n return (ia === -1 ? Number.MAX_SAFE_INTEGER : ia) - (ib === -1 ? Number.MAX_SAFE_INTEGER : ib);\n return 0;\n}\n\n/**\n * Blocks in the order a report is read: the window it covers, the totals, the\n * rows, and the echo of which preset produced it last of all. An `events`\n * breakdown or funnel leads, because it is what `--event --property` or\n * `--steps` asked for, and a reader cut off by `| head` must still see it.\n */\nconst BLOCK_ORDER = [\"eventBreakdown\", \"customFunnel\", \"window\", \"totals\", \"previous\", \"pageInfo\"];\n\nfunction byBlockOrder(a: string, b: string): number {\n const rank = (key: string) => {\n const at = BLOCK_ORDER.indexOf(key);\n if (at !== -1) return at;\n return key === \"preset\" ? BLOCK_ORDER.length + 1 : BLOCK_ORDER.length;\n };\n return rank(a) - rank(b);\n}\n\n/**\n * Columns, in the order the wire declares them, minus the ones no row filled.\n *\n * Per-column here where the JSON path prunes per-row: a table with a ragged\n * row is not a table, and a column of empty cells costs the header once rather\n * than once per row.\n */\nfunction columnsOf(rows: ReadonlyArray<Record<string, unknown>>): string[] {\n const seen: string[] = [];\n for (const row of rows) {\n for (const key of Object.keys(row)) {\n if (!seen.includes(key)) seen.push(key);\n }\n }\n return seen\n .filter((key) => rows.some((row) => !isAbsent(row[key]) && row[key] !== null && row[key] !== undefined))\n .sort(byIdentityFirst);\n}\n\nfunction table(rows: ReadonlyArray<Record<string, unknown>>): string {\n const cols = columnsOf(rows);\n if (cols.length === 0) return \"\";\n const head = `| ${cols.join(\" | \")} |`;\n const rule = `| ${cols.map(() => \"---\").join(\" | \")} |`;\n const body = rows.map((row) => `| ${cols.map((col) => cell(row[col], col)).join(\" | \")} |`);\n return [head, rule, ...body].join(\"\\n\");\n}\n\n/** A value that is a list of rows, i.e. a sub-table rather than a cell. */\nfunction isRowList(value: unknown): value is Array<Record<string, unknown>> {\n return (\n Array.isArray(value) &&\n value.length > 0 &&\n value.every((entry) => typeof entry === \"object\" && entry !== null && !Array.isArray(entry))\n );\n}\n\n/** Whatever names this row in a heading — its id, its slug, or its position. */\nfunction labelOf(row: Record<string, unknown>, index: number): string {\n for (const key of IDENTITY_COLUMNS) {\n const value = row[key];\n if (typeof value === \"string\" && value !== \"\") return value;\n }\n return `#${index + 1}`;\n}\n\n/**\n * A block whose rows carry nested rows of their own — a funnel and its steps.\n *\n * Rendered as the parent table followed by one sub-table per parent rather than\n * dumped as JSON. The JSON fallback was correct and nearly useless: `funnel`,\n * `flow` and `overview` all nest, they are the three commands most likely to be\n * the *first* call of a turn, and for them `--output md` was saving about 2%.\n */\nfunction nestedBlock(name: string, rows: ReadonlyArray<Record<string, unknown>>): string {\n const parents = rows.map((row) =>\n Object.fromEntries(Object.entries(row).filter(([, value]) => !isRowList(value) && !isPlainRow(value))),\n );\n const parts = [`### ${name}`, table(parents)];\n rows.forEach((row, index) => {\n for (const [key, value] of Object.entries(row)) {\n if (isRowList(value)) parts.push(`#### ${name}[${labelOf(row, index)}].${key}`, table(value));\n else if (isPlainRow(value)) parts.push(`#### ${name}[${labelOf(row, index)}].${key}`, table([value]));\n }\n });\n return parts.filter((part) => part !== \"\").join(\"\\n\");\n}\n\n/** An object that is one row rather than a list — `worstStep`. */\nfunction isPlainRow(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction block(name: string, value: unknown): string {\n if (Array.isArray(value)) {\n if (value.length === 0) return \"\";\n if (isTabular(value)) return `### ${name}\\n${table(value)}`;\n if (isRowList(value)) return nestedBlock(name, value);\n return `### ${name}\\n${JSON.stringify(value)}`;\n }\n if (typeof value === \"object\" && value !== null) {\n const entries = Object.entries(value as Record<string, unknown>);\n if (entries.length === 0) return \"\";\n if (entries.every(([, v]) => v === null || typeof v !== \"object\")) {\n return `### ${name}\\n${entries.map(([k, v]) => `- ${k}: ${v === null ? \"null\" : cell(v, k)}`).join(\"\\n\")}`;\n }\n return `### ${name}\\n${JSON.stringify(value)}`;\n }\n return `### ${name}\\n${cell(value)}`;\n}\n\n/**\n * The whole response as Markdown.\n *\n * A fifth to a half smaller than the compact JSON, because a\n * table names each column once instead of once per row. `warnings` and `hints`\n * lead rather than trail: they are instructions to the reader, and a reader\n * that has already summarised the table below them has acted without them.\n */\nexport function renderMarkdown(envelope: {\n data: Record<string, unknown>;\n warnings?: ReadonlyArray<{ code: string; message: string }>;\n hints?: readonly string[];\n}): string {\n const parts: string[] = [];\n for (const warning of envelope.warnings ?? []) parts.push(`> **${warning.code}** — ${warning.message}`);\n for (const hint of envelope.hints ?? []) parts.push(`> ${hint}`);\n for (const [name, value] of Object.entries(envelope.data).sort(([a], [b]) => byBlockOrder(a, b))) {\n const rendered = block(name, value);\n if (rendered !== \"\") parts.push(rendered);\n }\n return `${parts.join(\"\\n\\n\")}\\n`;\n}\n\n/**\n * An `--event` read that came back empty, said as what was empty.\n *\n * The event list is narrowed to the `--event` asked for, so an absent row\n * means the event had no rows in this window, and a present one with an empty\n * `eventBreakdown` means the `--property` (or `--where`) split it into nothing.\n * Calling the second \"that event does not exist\" — beside a list naming it —\n * is the contradiction BAKER-3379 recorded.\n */\nexport function missingBreakdownHint(\n data: Record<string, unknown>,\n asked: { eventName?: string; property?: string },\n): string[] {\n if (asked.eventName === undefined) return [];\n const listed = Array.isArray(data.customEvents)\n ? data.customEvents.find((row) => isPlainRow(row) && row.eventName === asked.eventName)\n : undefined;\n if (listed === undefined) {\n return [\n `No ${asked.eventName} events in this window. Run \\`baker analytics events\\` without --event for the names these pages send, or widen --days.`,\n ];\n }\n if (asked.property === undefined) return [];\n const breakdown = data.eventBreakdown;\n if (Array.isArray(breakdown) && breakdown.length > 0) return [];\n const keys = Array.isArray(listed.propertyKeys) ? listed.propertyKeys.join(\", \") : \"\";\n return [\n `${asked.eventName} has events in this window, but --property ${asked.property} split them into no rows (with --where, the filter matched none)${keys === \"\" ? \"\" : `. Its property keys: ${keys}`}.`,\n ];\n}\n\n/**\n * What the `(no consent)` row of a breakdown is, said before anyone goes\n * looking for a tracking fault in it.\n *\n * Its events are real and its visits are only an estimate: the collector\n * kept the event and dropped who it was, the page's own properties with it. Unexplained, an agent paged the raw feed seven times and wrote three\n * scripts to find that out (BAKER-3791).\n */\nexport function withheldBreakdownHint(\n data: Record<string, unknown>,\n asked: { eventName?: string; property?: string },\n): string[] {\n if (asked.eventName === undefined || asked.property === undefined || !Array.isArray(data.eventBreakdown)) return [];\n const row = data.eventBreakdown.find((entry) => isPlainRow(entry) && entry.value === EVENT_PROPERTY_WITHHELD);\n const events = isPlainRow(row) && typeof row.events === \"number\" ? row.events : 0;\n if (events === 0) return [];\n return [\n `${events} ${asked.eventName} events are \"${EVENT_PROPERTY_WITHHELD}\": recorded from visitors who declined analytics consent (or while the site measures in aggregate), so they carry no visit of their own and none of the page's own properties: their visits are estimated (\\`estimatedSessions\\`). They are real and count in every total; only their ${asked.property} is unknown. Report them as ${events} without consent, ${asked.property} unknown — not as a tracking fault, and not by reading the feed, which holds nothing more about them.`,\n ];\n}\n\n/**\n * `--event X --property Y` without `--full`: the breakdown asked for and the\n * window it covers, nothing site-wide.\n *\n * The totals and the event list answer a different question, and printed\n * beside the breakdown they pushed it past a `| head` and tripled what one\n * read cost (BAKER-2546). `--full` keeps them. Applied after the hints are\n * read, which still need the event list to say whether the event was there.\n */\nexport function narrowToBreakdown(\n data: Record<string, unknown>,\n asked: { eventName?: string; property?: string },\n full: boolean,\n): void {\n if (full || asked.eventName === undefined || asked.property === undefined) return;\n delete data.customEvents;\n delete data.totals;\n delete data.previous;\n}\n\n/**\n * `submissions --by-field` prints the answers and their window. The server\n * never reads the list of attempts for it; the site's traffic totals beside it\n * count something else, so they stay behind `--full`.\n */\nexport function narrowToAnswers(data: Record<string, unknown>, answerField: string | undefined, full: boolean): void {\n if (full || answerField === undefined) return;\n delete data.totals;\n delete data.previous;\n}\n\n/** The blocks that are a per-bucket series, which `--granularity` shapes. */\nconst SERIES_BLOCKS = [\"trend\", \"eventTrend\", \"customFunnelTrend\", \"flowTrend\", \"landings\"];\n\n/**\n * `--granularity` on a report that returned no series.\n *\n * The flag is shared by every report, and only a few have buckets to shape;\n * the rest accept it and change nothing, which read as \"no trend exists\" and\n * sent agents into one call per day (BAKER-2549, BAKER-924).\n */\nexport function noSeriesHint(\n data: Record<string, unknown>,\n granularity: string | undefined,\n warnings: readonly { code: string }[] = [],\n): string[] {\n if (granularity === undefined) return [];\n if (SERIES_BLOCKS.some((key) => key in data)) return [];\n // A series left out for size carries its own warning, which says why.\n if (warnings.some((warning) => warning.code === \"SERIES_CAPPED\")) return [];\n return [\n `--granularity ${granularity} shaped nothing: this report returned no per-bucket series. One comes with --full from overview, traffic or page (trend), events (eventTrend per event, --event <name> for one; customFunnelTrend with --steps) and flow (flowTrend per Form, --flow <slug> for one), narrowed with --landing, --platform or --role/--value like any report.`,\n ];\n}\n\n/** The formats this family renders. */\nexport const ANALYTICS_OUTPUT_FORMATS = [\"json\", \"md\"] as const;\n\n/**\n * Whether a `--output` value is one we render.\n *\n * Checked rather than defaulted, because the near-misses are the plausible\n * guesses — `markdown`, `table`, `csv` — and every one of them used to fall\n * through to JSON silently. An agent that asked for the cheap format, was\n * handed the expensive one, and was told nothing has no way to notice.\n */\nexport function isAnalyticsOutputFormat(value: string): boolean {\n return (ANALYTICS_OUTPUT_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Write the report.\n *\n * JSON stays the default and stays the envelope every other family returns, but\n * it is emitted compact. It used to go through the shared pretty-printer, which\n * indents two spaces per level — measured at a third to a half of the bytes of\n * every analytics response, spent on whitespace the reader gains nothing from.\n */\nexport function writeAnalyticsReport(\n envelope: {\n ok: true;\n data: Record<string, unknown>;\n warnings?: ReadonlyArray<{ code: string; message: string }>;\n hints?: readonly string[];\n },\n format: string,\n): void {\n if (format === \"md\") {\n process.stdout.write(renderMarkdown(envelope));\n return;\n }\n process.stdout.write(`${JSON.stringify(envelope)}\\n`);\n}\n\n/**\n * Above this many rows in one response, the format is worth a sentence.\n *\n * A flag nobody knows about is a flag nobody passes. The saving is real —\n * measured at 70% on a hundred-row keyword breakdown — but it only ever\n * happens on the second call, so the first one has to say so.\n */\nconst ROWS_BEFORE_FORMAT_HINT = 25;\n\n/** How many rows the response carries, across every block that is a list. */\nexport function rowCount(data: Record<string, unknown>): number {\n let total = 0;\n for (const value of Object.values(data)) {\n if (Array.isArray(value)) total += value.length;\n }\n return total;\n}\n\n/** Told once, when it would have mattered, and never on a report already in Markdown. */\nexport function formatHint(data: Record<string, unknown>, format: string): string[] {\n if (format === \"md\") return [];\n const rows = rowCount(data);\n if (rows < ROWS_BEFORE_FORMAT_HINT) return [];\n return [\n \"This report is long. If you are going to read the numbers rather than pick one field out of them, --output md returns the same answer as tables, typically a third to a half smaller.\",\n ];\n}\n","/**\n * `--fields`: the columns of a report the agent is going to read, and no others.\n *\n * A feed row is ~1.1 KB as stored and a per-visitor pass reads six short\n * strings of it; a landings row is eighteen columns and an agent cutting one\n * out of the printed table with `cut -d'|'` took the column beside it. Naming\n * the columns is cheaper than either and cannot pick the wrong one.\n *\n * A report is narrowed as the CLI's own `--fields` mask narrows any envelope\n * (`field-mask.ts`). On the feed the server projects too, so a page is a few\n * hundred bytes and may hold 1000 rows.\n */\n\nimport { analyticsTimelineRowSchema } from \"@baker/api/analytics\";\nimport { pickRow } from \"../../field-mask.ts\";\n\n/** Keys the feed adds on its way out rather than reading from the store. */\nconst DERIVED_FEED_FIELDS: Readonly<Record<string, readonly string[]>> = {\n destination: [\"sideEffectType\"],\n matchedBy: [\"userData\"],\n eventKind: [\"sideEffectName\"],\n};\n\n/**\n * What the feed's own reading needs from every row, asked for whatever was\n * requested: the held-back rows are recognised by `eventType` and `triggerId`,\n * and the hints read the upload's `eventId` and a searched person's terms.\n */\nconst FEED_SHAPING_FIELDS = [\"eventType\", \"triggerId\", \"sideEffectType\", \"eventId\", \"personTerms\"];\n\n/** Every column a feed row can carry. */\nexport const FEED_COLUMNS: readonly string[] = [\n ...Object.keys(analyticsTimelineRowSchema.shape),\n ...Object.keys(DERIVED_FEED_FIELDS),\n];\n\n/** The `--fields` list, or undefined when it was not given. */\nexport function parseFields(raw: unknown): string[] | undefined {\n if (raw === undefined || raw === true || raw === false) return undefined;\n const fields = [\n ...new Set(\n String(raw)\n .split(\",\")\n .map((field) => field.trim())\n .filter((field) => field !== \"\"),\n ),\n ];\n return fields.length > 0 ? fields : undefined;\n}\n\n/**\n * The keys the server keeps on each feed row: the asked-for ones (a dotted\n * `properties.utm_source` reads inside `properties`), and what the feed itself reads.\n */\nexport function serverFeedFields(fields: readonly string[]): string[] {\n const stored = fields.flatMap((field) => {\n const head = field.split(\".\")[0] ?? field;\n return DERIVED_FEED_FIELDS[head] ?? [head];\n });\n return [...new Set([...stored, ...FEED_SHAPING_FIELDS])];\n}\n\n/**\n * The feed's rows with only the asked-for keys, every row, whichever were\n * empty: the keys the server kept for the feed's own reading are not the\n * agent's. Hints name a column the feed does not have, and one that is empty\n * on every row of this page, so neither reads as the other.\n */\nexport function keepFeedFields(\n rows: readonly Record<string, unknown>[],\n fields: string[],\n): { rows: Record<string, unknown>[]; hints: string[] } {\n const kept = rows.map((row) => pickRow(row, fields));\n const unknown = fields.filter((field) => !FEED_COLUMNS.includes(field.split(\".\")[0] ?? field));\n const empty = fields.filter((field) => !unknown.includes(field) && !kept.some((row) => field in row));\n const hints = [\n ...(unknown.length > 0\n ? [\n `--fields ${unknown.join(\", \")}: not a feed column. A misspelling? The columns: ${[...FEED_COLUMNS].sort().join(\", \")}.`,\n ]\n : []),\n ...(empty.length > 0 && kept.length > 0 ? [`--fields ${empty.join(\", \")}: empty on every row of this page.`] : []),\n ];\n return { rows: kept, hints };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCO,SAAS,UAAU,MAAe,MAAmB,CAAC,GAAgB;AAC3E,MAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;AAC9C,QAAM,SAAS;AACf,MAAI,KAAK,MAAM;AACf,MAAI,MAAM,QAAQ,OAAO,QAAQ,EAAG,YAAW,SAAS,OAAO,SAAU,WAAU,OAAO,GAAG;AAC7F,SAAO;AACT;AAWO,SAAS,cAAc,MAAe,MAA8B;AACzE,QAAM,UAA0B,CAAC;AACjC,QAAM,YAA4B,CAAC;AAMnC,QAAM,QAAQ,UAAU,IAAI,EAAE,OAAO,CAAC,SAAS,OAAO,KAAK,OAAO,YAAY,KAAK,OAAO,EAAE;AAC5F,MAAI,MAAM,WAAW,EAAG,QAAO,CAAC;AAEhC,aAAW,QAAQ,OAAO;AACxB,UAAM,KAAK,KAAK;AAChB,UAAM,WAAW,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|
|
9
9
|
EVENT_INGEST_BATCH_MAX,
|
|
10
10
|
EVENT_INGEST_BODY_MAX_BYTES,
|
|
@@ -476,4 +476,4 @@ export {
|
|
|
476
476
|
eventIngestUrl,
|
|
477
477
|
ingestBrief
|
|
478
478
|
};
|
|
479
|
-
//# sourceMappingURL=chunk-
|
|
479
|
+
//# sourceMappingURL=chunk-LSNLFNDJ.js.map
|
|
@@ -1229,11 +1229,21 @@ var analyticsWindowSchema = z4.object({
|
|
|
1229
1229
|
});
|
|
1230
1230
|
var visitorsSchema = z4.number().int().nonnegative().nullable();
|
|
1231
1231
|
var newVisitorsSchema = z4.number().int().nonnegative();
|
|
1232
|
+
var estimatedVisitsSchema = z4.number().int().nonnegative().default(0);
|
|
1232
1233
|
var analyticsTotalsSchema = z4.object({
|
|
1233
1234
|
visitors: visitorsSchema,
|
|
1234
1235
|
newVisitors: newVisitorsSchema,
|
|
1235
|
-
/**
|
|
1236
|
+
/** Visits: every `session_start`, plus {@link estimatedSessions}. */
|
|
1236
1237
|
sessions: z4.number().int().nonnegative(),
|
|
1238
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1239
|
+
/**
|
|
1240
|
+
* Visits that allowed analytics at any point: every `session_start`, the
|
|
1241
|
+
* ones opened by accepting after arriving included, though their visit is
|
|
1242
|
+
* counted in {@link estimatedSessions}. Not a part of {@link sessions} to
|
|
1243
|
+
* add or subtract: it is the visits of the browsers `visitors` counts, so
|
|
1244
|
+
* visits per visitor is `consentingSessions ÷ visitors`.
|
|
1245
|
+
*/
|
|
1246
|
+
consentingSessions: z4.number().int().nonnegative().default(0),
|
|
1237
1247
|
pageViews: z4.number().int().nonnegative(),
|
|
1238
1248
|
/**
|
|
1239
1249
|
* Every conversion, counting a visit twice when it converted twice.
|
|
@@ -1281,6 +1291,13 @@ var analyticsTrendPointSchema = z4.object({
|
|
|
1281
1291
|
visitors: visitorsSchema,
|
|
1282
1292
|
newVisitors: newVisitorsSchema,
|
|
1283
1293
|
sessions: z4.number().int().nonnegative(),
|
|
1294
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1295
|
+
/**
|
|
1296
|
+
* Whether the pages marked their arrivals in this bucket, so the visits of
|
|
1297
|
+
* visitors who declined are estimated here — even when that estimate rounds
|
|
1298
|
+
* to 0. False under an ad scope, which estimates nothing.
|
|
1299
|
+
*/
|
|
1300
|
+
estimateCovered: z4.boolean().default(false),
|
|
1284
1301
|
pageViews: z4.number().int().nonnegative(),
|
|
1285
1302
|
conversions: z4.number().int().nonnegative()
|
|
1286
1303
|
});
|
|
@@ -1305,6 +1322,8 @@ var analyticsLandingRowSchema = z4.object({
|
|
|
1305
1322
|
sessions: z4.number().int().nonnegative(),
|
|
1306
1323
|
/** Sessions that BEGAN here — the page's Visits on screen, summing to the headline, and its rate's denominator. */
|
|
1307
1324
|
entrances: z4.number().int().nonnegative(),
|
|
1325
|
+
/** How many of {@link entrances} are estimated. */
|
|
1326
|
+
estimatedEntrances: estimatedVisitsSchema,
|
|
1308
1327
|
visitors: visitorsSchema,
|
|
1309
1328
|
newVisitors: newVisitorsSchema,
|
|
1310
1329
|
/**
|
|
@@ -1383,7 +1402,10 @@ var ANALYTICS_EVENT_ORIGINS = ["site", "systems", "both"];
|
|
|
1383
1402
|
var analyticsCustomEventRowSchema = z4.object({
|
|
1384
1403
|
eventName: z4.string(),
|
|
1385
1404
|
events: z4.number().int().nonnegative(),
|
|
1405
|
+
/** Visits that sent it: the real ones, plus {@link estimatedSessions}. */
|
|
1386
1406
|
sessions: z4.number().int().nonnegative(),
|
|
1407
|
+
/** How many of {@link sessions} are estimated, as {@link analyticsTotalsSchema.estimatedSessions}. */
|
|
1408
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1387
1409
|
visitors: z4.number().int().nonnegative(),
|
|
1388
1410
|
/**
|
|
1389
1411
|
* The property keys this event carries.
|
|
@@ -1414,7 +1436,9 @@ var EVENT_PROPERTY_WITHHELD = "(no consent)";
|
|
|
1414
1436
|
var analyticsEventBreakdownRowSchema = z4.object({
|
|
1415
1437
|
value: z4.string(),
|
|
1416
1438
|
events: z4.number().int().nonnegative(),
|
|
1439
|
+
/** Visits behind these events, {@link estimatedSessions} included — on `(no consent)`, nearly all of them. */
|
|
1417
1440
|
sessions: z4.number().int().nonnegative(),
|
|
1441
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1418
1442
|
/** Per currency, exactly as {@link analyticsCustomEventRowSchema.money}. */
|
|
1419
1443
|
money: z4.record(z4.string(), z4.number()).default({})
|
|
1420
1444
|
});
|
|
@@ -1431,7 +1455,9 @@ var analyticsEventTrendPointSchema = z4.object({
|
|
|
1431
1455
|
/** The `--property` value this series counts; absent when no property was asked. */
|
|
1432
1456
|
value: z4.string().optional(),
|
|
1433
1457
|
events: z4.number().int().nonnegative(),
|
|
1434
|
-
|
|
1458
|
+
/** Visits behind the bucket's events, {@link estimatedSessions} included. */
|
|
1459
|
+
sessions: z4.number().int().nonnegative(),
|
|
1460
|
+
estimatedSessions: estimatedVisitsSchema
|
|
1435
1461
|
});
|
|
1436
1462
|
var analyticsCustomFunnelTrendPointSchema = z4.object({
|
|
1437
1463
|
bucket: z4.string(),
|
|
@@ -1451,7 +1477,15 @@ var analyticsCustomFunnelStepSchema = z4.object({
|
|
|
1451
1477
|
var analyticsDeviceRowSchema = z4.object({
|
|
1452
1478
|
/** The bucket label — `Chrome 120.0`, `iOS 17.4`, `380–767`. */
|
|
1453
1479
|
bucket: z4.string(),
|
|
1480
|
+
/** Visits: the real sessions, plus {@link estimatedSessions}. */
|
|
1454
1481
|
sessions: z4.number().int().nonnegative(),
|
|
1482
|
+
/**
|
|
1483
|
+
* How many of {@link sessions} are visits of visitors who did not allow
|
|
1484
|
+
* analytics, estimated from the pages they arrived on. Their rows carry no
|
|
1485
|
+
* version, model or viewport, so they fall under the family's own bucket
|
|
1486
|
+
* (`Chrome`, `iOS`, the device type, `(not reported)`).
|
|
1487
|
+
*/
|
|
1488
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1455
1489
|
pageViews: z4.number().int().nonnegative(),
|
|
1456
1490
|
convertingSessions: z4.number().int().nonnegative(),
|
|
1457
1491
|
conversions: z4.number().int().nonnegative(),
|
|
@@ -1479,6 +1513,8 @@ var analyticsPageRowSchema = z4.object({
|
|
|
1479
1513
|
pageViews: z4.number().int().nonnegative(),
|
|
1480
1514
|
/** Sessions that began on this page — its value as a landing page. */
|
|
1481
1515
|
entrances: z4.number().int().nonnegative(),
|
|
1516
|
+
/** How many of {@link entrances} are estimated. */
|
|
1517
|
+
estimatedEntrances: estimatedVisitsSchema,
|
|
1482
1518
|
/**
|
|
1483
1519
|
* Conversions that fired ON this page — "which page converts".
|
|
1484
1520
|
*
|
|
@@ -1506,6 +1542,7 @@ var analyticsSourceRowSchema = z4.object({
|
|
|
1506
1542
|
source: z4.string(),
|
|
1507
1543
|
medium: z4.string(),
|
|
1508
1544
|
sessions: z4.number().int().nonnegative(),
|
|
1545
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1509
1546
|
conversions: z4.number().int().nonnegative(),
|
|
1510
1547
|
conversionRate: z4.number().min(0).max(1).nullable()
|
|
1511
1548
|
});
|
|
@@ -1528,6 +1565,7 @@ var analyticsCampaignRowSchema = z4.object({
|
|
|
1528
1565
|
*/
|
|
1529
1566
|
clickPlatform: z4.string(),
|
|
1530
1567
|
sessions: z4.number().int().nonnegative(),
|
|
1568
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1531
1569
|
conversions: z4.number().int().nonnegative(),
|
|
1532
1570
|
conversionRate: z4.number().min(0).max(1).nullable()
|
|
1533
1571
|
});
|
|
@@ -1554,6 +1592,7 @@ var analyticsRealtimeSchema = z4.object({
|
|
|
1554
1592
|
var analyticsDimensionRowSchema = z4.object({
|
|
1555
1593
|
key: z4.string(),
|
|
1556
1594
|
sessions: z4.number().int().nonnegative(),
|
|
1595
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1557
1596
|
conversions: z4.number().int().nonnegative(),
|
|
1558
1597
|
conversionRate: z4.number().min(0).max(1).nullable()
|
|
1559
1598
|
});
|
|
@@ -1617,7 +1656,14 @@ var analyticsFunnelSchema = z4.object({
|
|
|
1617
1656
|
* mid-flow Calendly node reports zero submits and every one of its real
|
|
1618
1657
|
* bookings here.
|
|
1619
1658
|
*/
|
|
1620
|
-
convertedSessions: z4.number().int().nonnegative()
|
|
1659
|
+
convertedSessions: z4.number().int().nonnegative(),
|
|
1660
|
+
/**
|
|
1661
|
+
* Visits by people who did not allow analytics that opened the Form,
|
|
1662
|
+
* estimated from their views of its first screen. In none of the counts
|
|
1663
|
+
* above: a visit nobody may identify cannot be followed from step to step,
|
|
1664
|
+
* so the funnel is real visits only and this says how many it leaves out.
|
|
1665
|
+
*/
|
|
1666
|
+
unconsentedVisits: z4.number().int().nonnegative().default(0)
|
|
1621
1667
|
});
|
|
1622
1668
|
var analyticsPaidRowSchema = z4.object({
|
|
1623
1669
|
source: z4.string(),
|
|
@@ -1726,9 +1772,12 @@ var analyticsGeoRowSchema = z4.object({
|
|
|
1726
1772
|
/** Always carried: a postcode without its country is ambiguous, a city twice over. */
|
|
1727
1773
|
country: z4.string(),
|
|
1728
1774
|
region: z4.string(),
|
|
1775
|
+
/** Visits: the real sessions, plus {@link estimatedSessions}. */
|
|
1729
1776
|
sessions: z4.number().int().nonnegative(),
|
|
1777
|
+
/** How many of {@link sessions} are visits of visitors who did not allow analytics, estimated. No postcode: theirs is not kept. */
|
|
1778
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1730
1779
|
conversions: z4.number().int().nonnegative(),
|
|
1731
|
-
/**
|
|
1780
|
+
/** Converting visits per visit, estimated ones on both sides, 0–1. Null below a usable sample. */
|
|
1732
1781
|
conversionRate: z4.number().min(0).max(1).nullable(),
|
|
1733
1782
|
/** People rather than browsers, where the visit identified itself. */
|
|
1734
1783
|
identifiedPeople: z4.number().int().nonnegative()
|
|
@@ -1816,9 +1865,23 @@ var analyticsWarningSchema = z4.object({
|
|
|
1816
1865
|
});
|
|
1817
1866
|
var analyticsFlowSummarySchema = z4.object({
|
|
1818
1867
|
flowSlug: z4.string(),
|
|
1868
|
+
/** Visits that opened the Form: the real ones, plus {@link estimatedSessions}. */
|
|
1819
1869
|
sessions: z4.number().int().nonnegative(),
|
|
1870
|
+
/**
|
|
1871
|
+
* How many of {@link sessions} are visits of visitors who did not allow
|
|
1872
|
+
* analytics, estimated from their views of the Form's first screen. They are
|
|
1873
|
+
* in {@link convertedSessions} too, estimated alike, and in nothing else here:
|
|
1874
|
+
* `starts` and the steps are real visits only.
|
|
1875
|
+
*/
|
|
1876
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1820
1877
|
starts: z4.number().int().nonnegative(),
|
|
1821
1878
|
convertedSessions: z4.number().int().nonnegative(),
|
|
1879
|
+
/**
|
|
1880
|
+
* How many of {@link convertedSessions} are estimated. A screen that shows
|
|
1881
|
+
* the Form's steps, which are real visits only, shows the real half and
|
|
1882
|
+
* states the estimate beside it, so the two never read as one number.
|
|
1883
|
+
*/
|
|
1884
|
+
estimatedConvertedSessions: estimatedVisitsSchema,
|
|
1822
1885
|
submits: z4.number().int().nonnegative(),
|
|
1823
1886
|
stepViews: z4.number().int().nonnegative(),
|
|
1824
1887
|
/** Distinct steps anyone reached, across all visits. */
|
|
@@ -1838,7 +1901,10 @@ var analyticsFlowSummarySchema = z4.object({
|
|
|
1838
1901
|
var analyticsFlowTrendPointSchema = z4.object({
|
|
1839
1902
|
bucket: z4.string(),
|
|
1840
1903
|
flowSlug: z4.string(),
|
|
1904
|
+
/** Visits that opened the Form in the bucket, {@link estimatedSessions} included. */
|
|
1841
1905
|
sessions: z4.number().int().nonnegative(),
|
|
1906
|
+
/** How many of {@link sessions} are estimated, as `analyticsFlowSummarySchema` counts them. */
|
|
1907
|
+
estimatedSessions: estimatedVisitsSchema,
|
|
1842
1908
|
starts: z4.number().int().nonnegative(),
|
|
1843
1909
|
convertedSessions: z4.number().int().nonnegative(),
|
|
1844
1910
|
submits: z4.number().int().nonnegative()
|
|
@@ -2937,4 +3003,4 @@ export {
|
|
|
2937
3003
|
EVENT_PROPERTY_WITHHELD,
|
|
2938
3004
|
analyticsTimelineRowSchema
|
|
2939
3005
|
};
|
|
2940
|
-
//# sourceMappingURL=chunk-
|
|
3006
|
+
//# sourceMappingURL=chunk-PNOKIJFM.js.map
|