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 revenueBoards
faurya insights boards create <websiteId> --name "Growth" --range last30dfaurya 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 --yesWidget kinds
kind | What it shows | What it takes |
|---|---|---|
number | One figure | Exactly one chartable metric |
chart | A time series, line or bar | Up to 2 metrics of the same grain, plus up to 4 markers |
breakdown | One dimension as ranked bars | One dimension:* metric and a measure |
map | Countries on a world map | dimension:country and a measure |
movement | Gains against losses | One movement:* metric |
goal-reach | Share of visitors completing each goal | goals:reach plus 1–8 goals |
goal-rhythm | Goals by day of the week | goals:rhythm plus 1–8 goals |
crawl-provider | One AI provider's crawler requests | One crawl:provider:<id> metric |
crawl-pages | Recently crawled pages | crawl:recent-pages |
live-orb | Visitors on the site right now | live:visitors |
Common metric keys (the catalog has the full list for your website):
| Group | Keys |
|---|---|
audience | uniqueVisitors, newVisitors, returningVisitors, sessions, pageviews, bounceRate, conversionRate, avgSessionDuration, revenuePerVisitor |
revenue | report:<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 |
dimension | dimension:referrers, dimension:campaign, dimension:pages, dimension:entryPages, dimension:country, dimension:region, dimension:city, dimension:browser, dimension:os, dimension:devices, dimension:hostname |
feed | Chart 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.jsonLeave 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 --yesLayout
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.jsonBuild 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.jsonLimits
| Boards per website | 50 |
| Widgets per board | 50 |
| Metrics / markers / filters per widget | 2 / 4 / 8 |
| Goals per goal widget | 8 |
| Board name / widget title | 60 / 80 characters |
| Grid | 12 columns; widgets 1–12 wide, 1–6 tall |
Errors
| Problem | Exit code | What to do |
|---|---|---|
| The board changed since you read it | 6 | Run boards get again and retry with the new --revision. |
| A widget combination is not allowed | 2 | The message says why, for example two metrics on a number tile. Check the catalog. |
| A goal or crawler isn't on this website | 2 | Use one the catalog lists. |
| 50 boards or 50 widgets already | 6 | Delete one first. |
Widgets overlap in layout save | 2 | Fix the placements and name every widget on the board. |
Missing --yes on a delete | 2 | Add --yes to confirm. |
| Permission denied | 4 | Enable Insights boards on your CLI token, and check your role on the website. |