@metricraven/cli 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/dist/commands.js +8 -0
  2. package/package.json +1 -1
package/dist/commands.js CHANGED
@@ -722,12 +722,20 @@ const RENDER = {
722
722
  // Hidden goals (Settings → Goals) stay out of the table, like the dashboard; --json has them all.
723
723
  const shown = d.goals.filter((g) => !g.hidden);
724
724
  const hidden = d.goals.length - shown.length;
725
+ const auto = (d.automaticEvents ?? []).filter((g) => !g.hidden);
725
726
  return [
726
727
  periodLine(d.period),
727
728
  section("Goals", shown.length
728
729
  ? table(["Goal", "Visitors", "Completions", "Rate"], shown.map((g) => [truncate(goalText(g)), num(g.visitors), num(g.events), pct(g.rate, 2)]), ["left", "right", "right", "right"])
729
730
  : dim("No goals in this period.")),
730
731
  hidden ? dim(`${num(hidden)} hidden goal${hidden === 1 ? "" : "s"} not shown (see --json or \`metricraven goals list\`).`) : "",
732
+ // Button clicks, form submissions and downloads: event counts here, people with `analytics goal <name>`.
733
+ auto.length
734
+ ? section("Automatic events", [
735
+ table(["Event", "Completions"], auto.map((g) => [truncate(goalText(g)), num(g.events)]), ["left", "right"]),
736
+ dim(`Visitors and revenue: metricraven analytics goal ${auto[0].name}`),
737
+ ].join("\n"))
738
+ : "",
731
739
  d.funnel?.length
732
740
  ? section("Funnel", table(["Step", "Visitors", "From start", "Median after previous"], d.funnel.map((s) => [s.displayName || s.step, num(s.visitors), pct(s.fromStart, 0), duration(s.medianSecondsFromPrevious)]), ["left", "right", "right", "right"]))
733
741
  : "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metricraven/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "MetricRaven from your terminal: traffic, revenue, goals, visitors and websites. Built for people and AI agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",