Cofounder

Analytics Dashboard

Keep the numbers you watch on the Analytics page's Custom tab in a dashboard you and your agent can update.

The Analytics page's Custom tab draws your company's dashboard from marketing/reports/dashboard.json in the Library. Your agent can build and change the dashboard, and you can add charts from Markdown 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.

The document contains schema_version: 1, a title, a summary, optional Markdown notes, and up to 40 tiles. Each tile has a stable ID, a chart block, and a position. For example, save this array as tiles.json:

[{
  "id": "signups",
  "position": {"column": 1, "row": 1, "column_span": 3, "row_span": 2},
  "block": {
    "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
  }
}]
cofounder analytics reports dashboard save --schema-version 1 --title "Dashboard" --summary "Weekly numbers." --tiles "$(cat tiles.json)"

Use the same inputs with cofounder analytics reports dashboard check to check the layout, run its queries, and verify that the saved JSON fits the 100,000-byte limit, without saving. Read the saved layout without running its queries, including for a legacy Markdown dashboard:

cofounder analytics reports dashboard get --file-id <file_id>

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. SQL and native 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 native blocks and SQL blocks with {filters} for the 7, 30, or 90 days picked on the page, in place of the block's own lookback_days. SQL blocks without {filters} keep their own range. To read the charts the same way, pass --lookback-days to cofounder analytics reports charts list, and --block for just one:

cofounder analytics reports charts list --file-id <file_id> --revision <revision> --block 2 --lookback-days 7

Use the revision returned by the layout read. If the dashboard changed, read the layout again and restart without a cursor. Omit --block to read every chart in pages. While page.has_more is true, repeat the command with --cursor set to page.next_cursor and keep the other flags.

Data 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

Positions are one-based on a 12-column grid. One row unit is half the height of a standard tile. A normal tile spans three columns and two rows; a wide tile spans six columns. Number tiles span at least two columns and can be one row tall. Other charts span at least three columns and two rows. Tiles cannot overlap. Narrow and read-only surfaces show tiles in document order.

Use a numbers chart for two to six related values from the same query. Each entry in metrics takes a short label, a numeric result column as value, and an optional format. The group occupies one tile.

When a number query has no value, the tile shows "No data yet". Set chart.empty_label to override that status, for example with "Not enough history".

A number chart compares with:

  • "compare_vs": "prior_period": the same number for the window just before. The query needs {filters} and the block a lookback_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

Update analysis on a report gives your agent the file ID and each block's number, period, and values on screen, so it starts from what you saw.

Commands

MCPCLIAPI