Instrument, ingest, and query — all from your agent, over the CLI or MCP. No browser in the loop.
Scrolltga for your agents.The agent fired the events; it wants five numbers back, not a dashboard to render.
No card, no admin in the loop — your agent can bootstrap its own tenant.
# No account yet? Create a tenant and its first key $ npm install -g analyga $ tga signup --slug acme --name "Acme" --username you --password ******** $ tga login --key tga_... # Five numbers, not a dashboard $ tga stats <websiteId> --from 7d --json
Works with: Claude Code · Cursor · Cline · Windsurf · Aider · Codex · any MCP client
But increasingly the thing that needs the numbers is an agent — it fired the events, it wants to know whether they landed, and it wants structured JSON back, not a chart to screen-scrape. analyga is the surface the agent drives itself. The CLI and MCP server are the primary interface here, not a wrapper bolted onto a REST API.
Did the events land, and did anyone make it through the flow? All read-only, all --json-able.
One product covering the traffic your site gets and the agent/MCP calls that drive it — query stats and funnels across both.
Top-line traffic and event counts over any window. Define a funnel once with tga funnel define, then run it whenever.
Cross-site stats for a whole team in one call — tga network <teamId> — so an agent branches on the numbers.
Send events with a scoped per-website key. A dropped-as-bot event fails loudly instead of faking a 200.
tga agent-schema --json emits every command, flag, type and error code. If it's not in the schema, it doesn't exist.
Every failure carries a stable code and a distinct exit code, so an agent branches on the outcome instead of string-matching.
Sign up keyless, or log in with an existing key. tga whoami tells you which tenant you're about to write to.
tga signup --slug acme --name "Acme"
tga login --key tga_...
Stats, events, funnels and network rollups — all read-only, all --json. The machine surface is a first-class citizen.
tga stats <id> --from 7d
tga funnel run <funnelId> --from 30d
Mint a scoped ingest key, then send with a stable --id so agents never collapse into one visitor.
tga ingest-key create <id>
tga send <id> --name signup --id u_42
Point Claude Code, Cursor, Cline, Windsurf — any MCP client — at analyga and your agent gets tools
covering stats, events, funnels, websites, identity, server-side ingest and billing checkout. A tool
result and --json output are the same bytes.
# Local, for Claude Code / Cursor / Cline / Windsurf $ tga mcp-serve # Remote — zero install, Bearer your API key URL: https://mcp.analyga.com/sse Auth: Authorization: Bearer tga_...
Metered only on event volume. Sign up keyless, then hand a human a Stripe Checkout URL when you're ready to upgrade.
An agent authenticates with its tenant key and gets back a checkout URL: tga billing checkout --plan pro
Failures carry a stable code and a distinct exit code. Once published, codes are never reworded.
| Exit | Meaning | What to do |
|---|---|---|
| 2 | usage | fix the call, do not retry |
| 3 | auth | fix the credential |
| 4 | permission | do not retry, escalate |
| 5 | not found | check the id |
| 6 | validation | fix the payload |
| 7 | rate limited | back off and retry |
| 8 | network | retry is reasonable |
| 9 | server | retry once, then report |
Yes. tga signup is keyless — it works before you have a credential — and creates a tenant plus its first API key with no card and no admin in the loop. The one step an agent can't do is pay: a human opens the Stripe Checkout URL once to upgrade.
The dashboard is for humans. analyga's primary interface is the tga CLI and the MCP server — the agent that fired the events queries the numbers itself, as structured JSON, and branches on them. Same product covers web traffic and agent/MCP traffic.
--id?Anonymous identity is derived from IP and user-agent. Agents share both — one CLI version is one user-agent, and agents often share an egress IP — so without a stable --id every agent behind that IP collapses into a single visitor. It cannot be backfilled.
A discarded event still answers HTTP 200 — the ingest endpoint returns {"beep":"boop"} when it drops an event as a bot. The CLI treats that as a hard failure with a hint, so an agent never believes a dropped event succeeded.
Run tga agent-schema --json. It returns every command, argument, flag, type and the full list of error codes — generated from the same table that drives the parser, help text and MCP tools, so it cannot drift. If it's not in the schema, it doesn't exist.
One install, and it queries stats and funnels across web and MCP, sends server-side events, and reads its own schema.
$ npm install -g analyga $ tga stats <websiteId> --from 7d --json
One more thing…
Agents run the instrumentation — but everything they capture lands in a complete, real-time dashboard. Live visitors, funnels, retention, revenue and journeys, all in one place. No terminal required.