Analytics Dashboard
Keep the numbers you watch on the Analytics page's Custom tab, as one report file your agent and you both edit.
The Analytics page's Custom tab is your company's dashboard. It is one
analytics report, marketing/reports/dashboard.md in the Library, drawn as a
grid: its chart blocks in file order, under its Markdown headings as section
titles. Your agent builds and changes it the way it saves any report, and you
add charts to it from your reports with Pin to dashboard.
Saving the dashboard needs a company admin. Any member can read it.
Build the Dashboard
The dashboard is saved with cofounder analytics reports dashboard save /
analytics_reports_dashboard_save. It is created the first time and
rewritten in place after that, so it keeps its link. Send the whole file each
time: read it first, change it, and save it back.
cofounder analytics reports dashboard save --title "Dashboard" --summary "Weekly numbers." --content "$(cat dashboard.md)"The content is report Markdown without the title, with up to 12 chart
blocks. Headings start sections; text between blocks shows as written:
## Growth
```chart
{"title": "Signups", "query": "select uniq(person_id) as signups from events where event = 'signed_up' and {filters}", "chart": {"kind": "number", "value": "signups", "compare_vs": "prior_period"}, "lookback_days": 30}
```
```chart
{"title": "Signups per day", "query": "select toDate(timestamp) as day, uniq(person_id) as signups from events where event = 'signed_up' and {filters} group by day order by day limit 400", "chart": {"kind": "line", "x": "day", "y": ["signups"]}, "lookback_days": 30}
```Every block's query runs before the dashboard saves. If one fails, or its
result doesn't fit its chart, nothing is saved and the error names the block.
Blocks, charts and {{id}} references in text work as in
analytics reports.
Pin a Chart
Open a report in the Analytics Reports tab and choose Pin to dashboard on a chart. Its block is added to the end of the dashboard, which is saved at once; the button says when it's pinned. A chart already on the dashboard shows Pinned. The first pin creates the dashboard.
Read It for a Period
The Custom tab reads every block for the 7, 30, or 90 days picked on the
page, in place of the block's own lookback_days. A block whose query has no
{filters} keeps its own range. To read the charts the same way, pass
--lookback-days to cofounder analytics reports charts get, and --block
for just one:
cofounder analytics reports charts get --file-id <file_id> --block 2 --lookback-days 7Data read in the last 15 minutes for the same query and range is reused. Older
data comes back at once marked stale, and the page rereads those charts. On a line or
bar chart over days, the last day is drawn lighter while it is still in
progress.
Size and Compare
A block's size is standard (one column) or wide (two). Without one,
line, bar, heatmap, and table charts are wide and the rest are standard.
A number chart compares with:
"compare_vs": "prior_period": the same number for the window just before. The query needs{filters}and the block alookback_days."compare_vs": "target"with"target": 5000: a goal.
display says how the comparison prints: pct (the default) as a percent
change, abs as the change in the number's own unit, or value as the
compared number itself. A percent over fewer than 20 prints as the change in
units instead, since a few events swing it widely; {{id.change}} in text
follows the same rule.
Ask Your Agent
Ask agent on a chart, and Update analysis on a report, hand your agent the file id, the block number, the period, and the values on screen when you asked, so it starts from what you saw.
Commands
| MCP | CLI | API |
|---|---|---|