Faurya CLI

Insights Boards

List, create, change, and lay out Faurya insights boards and their widgets from the CLI.

Insights Boards

The insights commands manage the boards on a website's Insights page: their names, ranges, widgets, and layout. They return a board's layout, not the numbers on it. Use the analytics and revenue commands for figures.

Insights boards are off by default. Enable Insights boards on your CLI token in Settings → CLI. They work on websites you own or are an admin or developer of. Guests and site API keys cannot use them.

Revisions

Every board has a revision. It increases when anyone changes the board or anything on it. Every write needs the revision you last read, passed as --revision:

faurya insights boards list <websiteId>
faurya insights boards update <websiteId> <boardId> --revision 3 --name "Growth"

If someone saved the board since you read it, the write is refused with a conflict (exit code 6) and nothing changes. Read the board again and retry with its new revision. The CLI never retries a write itself.

Each write returns the board's new revision. Pass it to your next write.

Read

faurya insights boards list <websiteId>
faurya insights boards get <websiteId> <boardId>

Before you build a widget, read the catalog. It lists every metric, the ten widget kinds and what each accepts, the ranges, the limits, and this website's own goals and AI crawler providers.

faurya insights catalog <websiteId>
faurya insights catalog <websiteId> --group revenue

Boards

faurya insights boards create <websiteId> --name "Growth" --range last30d
faurya insights boards update <websiteId> <boardId> --revision 3 --range last90d --position 0

--range accepts today, yesterday, last24h, last7d, last30d, last60d, or last90d, in any of the forms last30d, last_30_days, or LAST_30_DAYS.

Deleting a board deletes every widget on it:

faurya insights boards delete <websiteId> <boardId> --revision 3 --yes

Widget kinds

kindWhat it showsWhat it takes
numberOne figureExactly one chartable metric
chartA time series, line or barUp to 2 metrics of the same grain, plus up to 4 markers
breakdownOne dimension as ranked barsOne dimension:* metric and a measure
mapCountries on a world mapdimension:country and a measure
movementGains against lossesOne movement:* metric
goal-reachShare of visitors completing each goalgoals:reach plus 1–8 goals
goal-rhythmGoals by day of the weekgoals:rhythm plus 1–8 goals
crawl-providerOne AI provider's crawler requestsOne crawl:provider:<id> metric
crawl-pagesRecently crawled pagescrawl:recent-pages
live-orbVisitors on the site right nowlive:visitors

Common metric keys (the catalog has the full list for your website):

GroupKeys
audienceuniqueVisitors, newVisitors, returningVisitors, sessions, pageviews, bounceRate, conversionRate, avgSessionDuration, revenuePerVisitor
revenuereport:<slug> for every revenue report, e.g. report:monthly-recurring-revenue, report:paid-subscribers; and movement:mrr-movements, movement:net-mrr-movements, movement:subscriber-movements, movement:subscription-movements
dimensiondimension:referrers, dimension:campaign, dimension:pages, dimension:entryPages, dimension:country, dimension:region, dimension:city, dimension:browser, dimension:os, dimension:devices, dimension:hostname
feedChart markers: notes, xMentions, githubPushes, redditMentions

Some revenue metrics are monthly and only allow longer ranges. The catalog lists each metric's allowed ranges.

Widgets

A widget's content is its kind, metrics, and overlays, sent together as JSON:

{
  "content": {
    "kind": "chart",
    "metrics": [{ "metricKey": "uniqueVisitors" }]
  },
  "title": "Visitors"
}
faurya insights widgets add <websiteId> <boardId> --revision 3 --input-file widget.json

Leave out placement and the widget goes in the first free cell that fits. The whole widget is checked before anything is saved. A metric, goal, or crawler that the catalog does not list for this website is refused.

More widget examples

A number tile for MRR:

{
  "content": { "kind": "number", "metrics": [{ "metricKey": "report:monthly-recurring-revenue" }] },
  "title": "MRR"
}

A two-metric chart with markers. The first metric uses the left axis and the second the right:

{
  "content": {
    "kind": "chart",
    "metrics": [
      { "metricKey": "sessions", "form": "BAR" },
      { "metricKey": "conversionRate", "form": "LINE" }
    ],
    "markers": [{ "markerKey": "githubPushes" }]
  },
  "rangeOverride": "LAST_90_DAYS"
}

Revenue by referrer:

{
  "content": {
    "kind": "breakdown",
    "metrics": [{ "metricKey": "dimension:referrers" }],
    "measure": { "kind": "revenue" }
  }
}

Signups by country, on a map:

{
  "content": {
    "kind": "map",
    "metrics": [{ "metricKey": "dimension:country" }],
    "measure": { "kind": "goal", "goal": "signup" }
  }
}

How many visitors reach each goal:

{
  "content": {
    "kind": "goal-reach",
    "metrics": [{ "metricKey": "goals:reach" }],
    "goals": ["signup", "initiate_checkout", "purchase"]
  }
}

For small widgets, pass the JSON inline with --input instead of a file:

faurya insights widgets add <websiteId> <boardId> --revision 3 \
  --input '{"content":{"kind":"number","metrics":[{"metricKey":"uniqueVisitors"}]}}' --title "Visitors"

Change a widget

faurya insights widgets update <websiteId> <widgetId> --revision 4 --title "Unique visitors"

Filter a widget to a segment. Dimensions are REFERRER, CAMPAIGN, HOSTNAME, PATH, ENTRY_PAGE, COUNTRY, REGION, CITY, BROWSER, OS, and DEVICE:

faurya insights widgets update <websiteId> <widgetId> --revision 5 \
  --input '{"filters":[{"dimension":"COUNTRY","value":"US"}]}'

content and filters replace what is stored. Send every metric, marker, and filter you want to keep, or they are removed.

faurya insights widgets delete <websiteId> <widgetId> --revision 4 --yes

Layout

layout save places every widget on a board in one call, on a 12-column grid. Name every widget on the board. The call is refused if two widgets overlap or a widget runs past column 12.

{
  "widgets": [
    { "id": "<widgetId>", "x": 0, "y": 0, "w": 6, "h": 3 },
    { "id": "<widgetId>", "x": 6, "y": 0, "w": 6, "h": 3 }
  ]
}
faurya insights layout save <websiteId> <boardId> --revision 5 --input-file layout.json

Build a board from scratch

# 1. Check what you can use
faurya insights catalog <websiteId> --group revenue

# 2. Create the board (returns its id and revision 1)
faurya insights boards create <websiteId> --name "Revenue" --range last90d

# 3. Add widgets, passing the revision each write returns
faurya insights widgets add <websiteId> <boardId> --revision 1 --input-file mrr.json
faurya insights widgets add <websiteId> <boardId> --revision 2 --input-file subscribers.json
faurya insights widgets add <websiteId> <boardId> --revision 3 --input-file churn-chart.json

# 4. Optionally arrange them
faurya insights boards get <websiteId> <boardId>
faurya insights layout save <websiteId> <boardId> --revision 4 --input-file layout.json

Limits

Boards per website50
Widgets per board50
Metrics / markers / filters per widget2 / 4 / 8
Goals per goal widget8
Board name / widget title60 / 80 characters
Grid12 columns; widgets 1–12 wide, 1–6 tall

Errors

ProblemExit codeWhat to do
The board changed since you read it6Run boards get again and retry with the new --revision.
A widget combination is not allowed2The message says why, for example two metrics on a number tile. Check the catalog.
A goal or crawler isn't on this website2Use one the catalog lists.
50 boards or 50 widgets already6Delete one first.
Widgets overlap in layout save2Fix the placements and name every widget on the board.
Missing --yes on a delete2Add --yes to confirm.
Permission denied4Enable Insights boards on your CLI token, and check your role on the website.