Actually Tracking

CLI

Query your Actually Tracking analytics from the terminal.

The CLI runs the same queries as the MCP server: traffic, pages, sources, events, funnels and revenue, printed as tables or JSON. It needs Node 18 or later.

npx @actually-tracking/cli login
npx @actually-tracking/cli overview

Install it to drop the npx:

npm install -g @actually-tracking/cli
actually-tracking pages --days 7

Signing in

actually-tracking login opens your browser on the same consent screen AI apps use: pick one project, or every project of an organization if you're its admin. The CLI gets read-only access, kept in ~/.config/actually-tracking/config.json (readable only by you) and refreshed on its own. actually-tracking logout signs out and revokes it; you can also disconnect it in Project settings → MCP.

For CI and scripts, use a client token instead (base64(clientId:clientSecret), from Project settings → Clients / API keys):

ACTUALLY_TRACKING_TOKEN=... actually-tracking revenue --json

Commands

CommandWhat it shows
projectsThe projects you can query
use <project-id>Sets the default project
overviewVisitors, pageviews, sessions, bounce rate and duration (--series adds the per-day series)
pagesTop pages
sourcesTop referrers (--by for another breakdown)
countries, devicesVisitors by country or device
events [names…]Recent events, optionally only these names
event-namesEvery event name in the project
revenueRevenue, MRR, subscription activity and revenue by source (--by utm_campaign, …)
funnel <a> <b> […]Conversion through these events, in order
botsAI crawlers and other bots: visits, verification, top pages
liveWho is on the site now: locations, pages, latest events and payments (--limit visitors)
toolsEvery tool the API offers
call <tool> [key=value…]Any tool, e.g. call get_top_pages limit=5

Managing funnels, goals, alerts, the team and keys

These commands change things, so they need an API key with the matching permission rather than a browser sign-in: actually-tracking login --token <key>, or ACTUALLY_TRACKING_TOKEN. The key is base64 of clientId:clientSecret.

Command
funnelsSaved funnels
funnels create <name> <step…>Steps are events, or pages starting with /. --window <hours>, --by visitor, --range 30d
funnels run <id>Conversion at each step, over --days, --from and --to or the funnel's own range
funnels delete <id>
goalsEvents with completions and conversion rate
goals mark <event> / goals unmark <event>Count an event as a conversion, or stop
alerts / alerts historyAlerts, and the ones that went out
alerts create <name> <step…>Fires on any of the steps; --funnel for all of them in order; --email also emails the project's members
alerts delete <id>
teamMembers and open invites
team invite <email>--role viewer or member (default)
team remove <user-id>Members and viewers only; owners and admins are managed in the dashboard
keysAPI keys
keys create <name> --permissions <a,b>--org for every project in the organization
keys revoke <id>
actually-tracking funnels create "Pricing to signup" /pricing signup --window 48
actually-tracking goals mark signup
actually-tracking alerts create "New signup" signup --email

Options

Option
--project <id>Project to query; else the default from use or ACTUALLY_TRACKING_PROJECT
--days <n>, --from, --toDate range (default: the last 30 days)
--limit <n>Rows to return
--jsonRaw JSON, for jq and scripts
--api-url <url>Another Actually Tracking API

On this page