@koda-sl/baker-cli 0.226.0 → 0.228.0-dev.7fac4f17c

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/README.md CHANGED
@@ -1151,6 +1151,54 @@ Each finding: `{id, area, check, status, severity, evidence, fix: {explanation,
1151
1151
 
1152
1152
  ---
1153
1153
 
1154
+ ### First-party web analytics (`baker analytics`)
1155
+
1156
+ Baker's own measurement of the pages it publishes. No connection to set up and nothing to configure — data exists from the moment a page is published — and it is the only source that reports drop-off **per Form step**.
1157
+
1158
+ Preset-first; `overview` answers most questions in one call.
1159
+
1160
+ ```bash
1161
+ baker analytics overview # traffic, top pages, sources, and every Form's worst step
1162
+ baker analytics overview --days 7
1163
+ baker analytics traffic --days 90 --full # full breakdowns plus the per-day trend
1164
+ baker analytics funnel --flow contact # which step loses people
1165
+ baker analytics page --path /pricing # one page in detail
1166
+ baker analytics triggers --flow contact # what visitors did in the Form, wired up or not
1167
+ baker analytics releases # traffic and conversions per published build
1168
+ baker analytics landings # every page side by side, with a sparkline each
1169
+ baker analytics landings --tag q4 # only the pages filed under one campaign tag
1170
+ baker analytics tags # the same numbers rolled up per campaign
1171
+ baker analytics events # the events the pages define for themselves
1172
+ baker analytics events --event video_progress --property milestone
1173
+ baker analytics events --steps hero_view,pricing_view,demo_click # an ordered page funnel
1174
+ baker analytics devices --grain viewport # which widths the page has to survive
1175
+ baker analytics geo --grain postal_code --country ES
1176
+ baker analytics bots # which crawlers fetch the site
1177
+ baker analytics presets # what each report answers
1178
+ ```
1179
+
1180
+ Shared flags: `--days <n>` (default 30) or `--start-date` / `--end-date` (`YYYY-MM-DD`, end inclusive); `--full`; `--compare` to also return the preceding window of the same length; `--timezone <IANA>` and `--granularity hour|day|week|month` to shape a series. Every call reads live — there is no cache layer, so there is nothing to bypass.
1181
+
1182
+ Pass `--timezone` whenever the client is not in UTC. Day boundaries are drawn in UTC by default, which moves two hours of every Spanish evening onto the following day — not a rounding error on a day-of-week comparison, but the wrong day.
1183
+
1184
+ Reading the output:
1185
+
1186
+ - `visitors` and `sessions` are counted from explicit `visitor_new` / `session_start` events, so a session begins when the page says it did rather than when a query guesses.
1187
+ - `pageViews` prefers the server-side count, which ad blockers cannot suppress, so it usually exceeds what GA4 reports for the same period.
1188
+ - Rates are `null`, never `0`, when there is no denominator — `null` means "no data", `0` means "genuinely none".
1189
+ - `warnings[]` and `hints[]` carry caveats (small sample, sampled data) that belong in the answer, not in the footnotes.
1190
+ - `triggers[]` reports what visitors *did* inside a Form — a link click that redirects them off the site, a scheduling widget, an embedded checkout posting back — none of which produces a funnel step. `sideEffectsFired` says how many of those fires actually did something; a trigger with many fires and none is real behaviour with nothing wired to it.
1191
+ - `releases[]` gives one row per published build, so a change to a page can be compared before and after instead of against a date. Only events carrying a build are counted, so its `pageViews` sits below the site total for the same period.
1192
+
1193
+ - `landings[]` is one row per page with its real name and campaign tags, joined from a dimension Baker mirrors on every publish. An empty `name` means the mirror has not caught up — say "not synced yet" rather than showing the id as a title.
1194
+ - `trend[]` returns **every** bucket in the window, including ones with no traffic. A quiet day is a real zero rather than a missing row, so a chart cannot draw a straight line through it and imply traffic that did not happen.
1195
+ - `customEvents[]` covers only events a page defined for itself through `data-baker-*` attributes or `window.baker.track()`. Each row lists the property keys it carries, which is what tells you what you can break it down by.
1196
+ - `customFunnel[]` is **ordered**: a session counts at step N only if it produced step N after step N-1. Reordering `--steps` answers a different question.
1197
+
1198
+ Data is retained for 400 days; a window reaching further back comes back with a `BEYOND_RETENTION` warning, and the older part is missing rather than zero.
1199
+
1200
+ ---
1201
+
1154
1202
  ### Google Analytics 4 (`baker ga4`)
1155
1203
 
1156
1204
  GA4 commands for multi-channel audits **and** for configuring what the property measures. Playbook-aligned report presets, property health audits, free-form Data API queries, and staged Admin API writes.
@@ -16,9 +16,9 @@ import {
16
16
  shouldEscalate
17
17
  } from "./chunk-DZUVUGEP.js";
18
18
 
19
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js
19
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js
20
20
  var require_safe_stable_stringify = __commonJS({
21
- "../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(exports, module) {
21
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js"(exports, module) {
22
22
  "use strict";
23
23
  var { hasOwnProperty } = Object.prototype;
24
24
  var stringify = configure2();
@@ -1092,7 +1092,7 @@ function resolveAdaptFormats(params) {
1092
1092
  return params.formats ?? [];
1093
1093
  }
1094
1094
 
1095
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/esm/wrapper.js
1095
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/esm/wrapper.js
1096
1096
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1097
1097
  var configure = import__.default.configure;
1098
1098
  var wrapper_default = import__.default;
@@ -9074,4 +9074,4 @@ export {
9074
9074
  defaultRegistry,
9075
9075
  createEngineFromEnv
9076
9076
  };
9077
- //# sourceMappingURL=chunk-EKLAHWSF.js.map
9077
+ //# sourceMappingURL=chunk-CMPAHYLB.js.map