@wrangled/cli 0.3.155 → 0.3.157

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
@@ -328,7 +328,7 @@ To change the map, write the whole map as JSON (\`{"offers": [...], "funnels": [
328
328
 
329
329
  \`--counts-from fix\` (the default) makes the map count for every past date the current map counted, as a fix; \`--counts-from <YYYY-MM-DD>\` makes it a change in the business that counts from that day (today or earlier). Save a fix and a change as two drafts, the fix first. \`--questions @questions.json\` asks a person what only they can settle: an array of \`{question_id, text, kind, evidence, options: [{label, patch}], default_option}\`, where the map already holds the default option and each other option's patch is JSON Patch ops on the map, naming offers, funnels and steps by key (\`/offers/course/matches/-\`). A question whose options all count the same sales and people, or that was answered already, is left out; at most 7 stay open, biggest money at stake first, and the checks add a yes/no question for each weak part no question covers. People answer them in the app; an answer saves the map as a fix, and later drafts keep it. \`${cli} funnels show\` lists the open and answered questions and says whether the map counts as a fix or from a date.
330
330
 
331
- \`${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, named by its key, the word in parentheses after its name, never its number): 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. So does a page step whose visit data (the visit tag when the workspace has it, else GA4) has never recorded its address. \`${cli} pages results\` can still show views for that page, but those are Facebook's page loads from the ads that link to it, a different count: a Traffic step with an ad_traffic rule counts them, never the page step. 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\`.
331
+ \`${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, named by its key, the word in parentheses after its name, never its number): 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. So does a page step whose visit data (the visit tag when the workspace has it, else GA4) has never recorded its address. Beside it, such a step shows the page loads Facebook counted from the ads that link to its pages in those days, the views \`${cli} pages results\` shows. That is a different count from visits, so it never enters the funnel's math or its comparisons; a Traffic step with an ad_traffic rule is the step that counts page loads. 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\`.
332
332
 
333
333
  \`${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. For a step people take days to reach, shown "within N days", only people who reached the step before at least N days before each window ended count, and only those who moved on within N days, in both windows, and its last 7 days end N days early, so a slow step compares fairly. Start here before writing a conversion test idea.
334
334
 
package/dist/main.js CHANGED
@@ -4179,7 +4179,9 @@ function winnersAdLines(ad, currency, words) {
4179
4179
  const goal = onSales ? words.primary : (words.fallback ?? FIRST_LEAD);
4180
4180
  const [costPer, number] = onSales ? [n.costPerSale, n.sales] : [n.costPerSignup, n.signups];
4181
4181
  const cost = costPer === null ? `no ${goal.many}` : `${money(costPer, currency)} per ${goal.one}`;
4182
- const name = [ad.name ?? `Ad ${ad.adId}`, ad.sku && `[${ad.sku}]`, ad.campaignName && `(${ad.campaignName})`].filter(Boolean).join(" ");
4182
+ const merged = ad.adIds !== undefined && ad.adIds.length > 1 ? ad.adIds.length : 0;
4183
+ const title = merged > 0 ? `${ad.creativeName ?? ad.name} (${merged} ads)` : (ad.name ?? `Ad ${ad.adId}`);
4184
+ const name = [title, ad.sku && `[${ad.sku}]`, ad.campaignName && `(${ad.campaignName})`].filter(Boolean).join(" ");
4183
4185
  const tags = Object.entries(ad.tags).map(([field, value]) => `${field}: ${value}`).join(", ");
4184
4186
  const count = number !== null && countOf(number, goal);
4185
4187
  const facebook = n.facebookResults == null ? "" : `, Facebook counts ${tenths(n.facebookResults)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrangled/cli",
3
- "version": "0.3.155",
3
+ "version": "0.3.157",
4
4
  "description": "Command-line access to your marketing data warehouse, for people and coding agents",
5
5
  "type": "module",
6
6
  "bin": {