@wrangled/cli 0.3.29 → 0.3.30

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/guide.js CHANGED
@@ -171,6 +171,8 @@ To change the map, write the whole map as JSON (\`{"offers": [...], "funnels": [
171
171
 
172
172
  \`${cli} funnels numbers\` counts each step of each funnel in the confirmed map over \`--from\` and \`--to\` (default the last 30 days; \`--funnel <key>\` for one funnel): how many reached it, and how many of those who reached the step before in those days moved on to it within the window, with the drop-off and the median days it took. A step whose rules name a person (webinar, GoHighLevel, payments) counts people and follows the same people from step to step; a step that cannot (ad clicks, page visitors) counts events, and its comparison is a rate of counts. A step whose data is not connected says unknown, never 0. Numbers are worked out after each sync by the rules of the map version confirmed at the time, so a renamed step keeps its numbers. For SQL, read \`saved_funnel_steps\`, \`funnel_step_daily\` and \`funnel_conversion\`.
173
173
 
174
+ \`${cli} funnels leaks\` (\`--funnel <key>\` for one funnel, \`--to <date>\` for the last day) finds where each funnel loses people now: each step's rate from the step before over the last 28 days and the last 7, against its own normal rate over the 56 days before. A step doing worse says about how many fewer people moved on (the recent cohort times the rate it fell by) and what they were worth: an estimate, per currency and never added across them, from the offer prices of this step and the later purchase steps at the recent rates. The worst steps are listed first, by money, then people. A step with fewer than 100 people at the step before in either window says too few to tell and is never ranked; the 7-day rate needs 20. For a step counted by people, the recent cohort is also split by each person's first touch as of the day they reached the step before: channel, then the top 5 Meta campaigns and ads. People who reached the step before near the end of the window may not have moved on yet, so a slow step can look slightly worse. Start here before writing a conversion test idea.
175
+
174
176
  \`${cli} funnels evidence\` gathers what the workspace's own data says it sells, to draft a map from: the prices people paid in the last 365 days on each platform with buyer counts, the most common orders in which one person paid (\`1500 → 497 → 3500\`, with the median days between), GoHighLevel funnels and their steps, calendars with bookings and shows, pipeline stages, the most used tags, webinars with sign-ups, viewers and offer clicks, the landing pages ads link to, and active Facebook campaigns with 30-day spend. A part whose source is not connected says so. Ids, counts and amounts only. The \`map-offers\` playbook (\`${cli} skill install map-offers\` installs it as the \`${MAP_OFFERS_SKILL_NAME}\` skill, with a worked example map beside it; \`${cli} docs map-offers\` prints it) walks an agent from the evidence to a draft.
175
177
 
176
178
  \`${cli} funnels versions\` lists every version with its status (draft, confirmed, replaced or discarded), who wrote and confirmed it and its note; \`--diff <a> <b>\` says what changed from version a to version b.
@@ -311,6 +313,7 @@ ${cli} plans status <plan-id> draft|ready|publishing|live|done|cancelled
311
313
  ${cli} trail <plan-id | sku | item-id> how a plan's items were made, where they ran, and their results
312
314
  ${cli} funnels show [--version <n>] | funnels versions [--diff <a> <b>] the offers and funnels map, as text, and its versions
313
315
  ${cli} funnels numbers [--funnel <key>] [--from <date>] [--to <date>] how many reached each funnel step and moved on
316
+ ${cli} funnels leaks [--funnel <key>] [--to <date>] the steps doing worse than their normal, costliest first
314
317
  ${cli} funnels evidence prices paid, buyer paths, GoHighLevel funnels, calendars and tags, webinars, pages and campaigns, to draft the map from
315
318
  ${cli} funnels draft --file <map.json> [--note <why>] [--evidence '<json>' | @file.json] [--based-on <n>] [--counts-from fix|<date>] [--questions @file.json] save the whole map; it goes live when every step can be counted
316
319
  ${cli} facts [--kind <kind>] [--subject <type>[:<ref>]] [--status <status>] [--json] | facts show <id> settled facts about the data, to treat as true
package/dist/main.js CHANGED
@@ -1083,6 +1083,17 @@ const commands = {
1083
1083
  process.stdout.write(view.text);
1084
1084
  },
1085
1085
  },
1086
+ "funnels leaks": {
1087
+ usage: "funnels leaks [--funnel <key>] [--to <YYYY-MM-DD>] the funnel steps doing worse than their normal, costliest first, with what that costs",
1088
+ async run(args, options) {
1089
+ if (args.length > 0 || options.from !== undefined)
1090
+ throw new CliError("Usage: funnels leaks [--funnel <key>] [--to <date>]", exitCodes.usage);
1091
+ const view = await api(await resolveConnection(options.apiUrl), `${FUNNELS_PATH}/leaks${reportQuery(options, { funnel: options.funnel })}`);
1092
+ if (options.format === "json")
1093
+ return printJson(view);
1094
+ process.stdout.write(view.text);
1095
+ },
1096
+ },
1086
1097
  "funnels evidence": {
1087
1098
  usage: "funnels evidence what the data says the client sells: prices paid, buyer paths, GoHighLevel funnels, calendars and tags, webinars, pages, campaigns, past campaigns",
1088
1099
  async run(args, options) {
@@ -2169,7 +2180,7 @@ Options:
2169
2180
  --counts-from fix|<YYYY-MM-DD> how funnels draft counts: fix (default) for past dates too, or a change from that day
2170
2181
  --questions <json | @file.json> the questions funnels draft asks a person, as an array
2171
2182
  --diff <a> <b> with funnels versions, what changed from version a to version b
2172
- --funnel <key> only this funnel's steps in funnels numbers (default: every funnel in the confirmed map);
2183
+ --funnel <key> only this funnel's steps in funnels numbers and funnels leaks (default: every funnel in the confirmed map);
2173
2184
  with plans create and --step, the funnel the push is a step of
2174
2185
  --step <key> with plans create, the step of --funnel this push itself is, as on the confirmed map
2175
2186
  --harness <list> which agents skill publish marks the skill for: claude, codex, or claude,codex (default)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrangled/cli",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Command-line access to your marketing data warehouse, for people and coding agents",
5
5
  "type": "module",
6
6
  "bin": {