Skip to main content
The formo analytics command exposes Formo’s pre-built analytics pipes (the same data that powers the Formo dashboard) as terminal commands. Each pipe is a subcommand: formo analytics <pipe>.
Requires query:read scope on your API key.

formo analytics <pipe>

Pipes

Options

--params may not set date_from/date_to/filters; use the dedicated --date-from/--date-to/--filters flags for those. Object/array values in --params are JSON-encoded automatically (e.g. funnel’s steps).

--filters

A JSON array of { field, op, value } filters, e.g. [{"field":"location","op":"eq","value":"US"}]. For multi-value matching, use in / nin with an array value (e.g. ["chrome","firefox"]); pipe-delimited strings remain supported by the analytics query boundary. Use this array for event and user-attribute predicates. On the user-aggregate pipes (lifecycle, frequency) it also takes profile metrics, social identity fields, a lifecycle entry ({"field":"lifecycle","op":"in","value":["New","Power user"]}), and resource entries using the stable fields chains.balance, apps.balance, tokens.balance and labels.value with named qualifiers (chain_id, app_id, token_address, scope, tag_id). Qualifiers must be non-empty strings; the CLI validates required and forbidden qualifiers before sending the request.
On lifecycle and frequency, either-touch attribution filters can use a fields pair instead of field. Supply exactly two non-empty column names and only one selector:
Overview Data source filters use field: "channel" with web, mobile, api, import, server, or onchain. Acquisition channel uses channel_type. User-aggregate source filters use source_filter through --params with field: "source".
The retired per-family params — socials, chain_filters, app_filters, token_filters, label_filters, profile_filters, lifecycle_filter — are rejected with a 400 if passed through --params. Forwarding them would silently drop the predicate and broaden the result set, so the API fails loud instead. Send a canonical entry in --filters.

--params (pipe-specific)

Some pipes take additional, pipe-specific parameters. Pass them as a JSON object via --params: page_scope only affects requests that carry a page filter. The default scopes metrics to activity on that page; session restores the legacy behaviour where metrics include all activity in any session that viewed the page.

Funnel OR groups

A funnel step can include events to match alternatives with OR logic. The executable group can contain at most 10 events in total, including the primary type/event, which is always included. Step-level filters apply to the whole group; each alternative’s filters apply only to that member. This feature applies to funnel steps, rather than user-path anchors or retention entry filters.

Rolling and recurring retention

Rolling retention counts cohort members active in week N or any later week. Recurring retention counts members active in exactly week N. Rolling is the default; select recurring explicitly:

Examples

The response shape matches the dashboard data: { meta, data, rows, statistics }.