.aider.conf.yml + script tag · open source (MIT) · ask in plain English

Add analytics with Aider.

Aider pairs with you from the terminal, and unlike Cursor or Cline it ships no MCP client, so there is no server to register. What does work: aider writes the instrumentation from a conventions file you pass with --read, and you pull real numbers into the chat with /run curl against the /v1 API, which serves the same deterministic reports as the dashboard.

.aider.conf.yml + script tag
# aider has no MCP client, so there is no server block to add. Two things instead:

# 1. give it your instrumentation conventions as a read-only file
aider --read ANALYTICS.md src/App.tsx
#    or permanently, in .aider.conf.yml at the repo root:
#    read: [ANALYTICS.md]

# 2. pull a real number into the chat with /run (alias !)
/run curl -s "https://YOUR-INSTANCE/v1/funnel?steps=signup,activate,checkout" -H "Authorization: Bearer READ_KEY"

# the snippet aider writes into your root HTML head:
# <script src="https://YOUR-INSTANCE/sdk.js"></script>
# <script>smolanalytics.init("WRITE_KEY", { host: "https://YOUR-INSTANCE" })</script>

--read pins the conventions file read-only (and cached, if your model does prompt caching). /run executes a shell command and offers to add its output to the chat, which is how a real number gets into aider's context.

how do I add analytics to aider?

Aider pairs with you from the terminal, and unlike Cursor or Cline it ships no MCP client, so there is no server to register. What does work: aider writes the instrumentation from a conventions file you pass with --read, and you pull real numbers into the chat with /run curl against the /v1 API, which serves the same deterministic reports as the dashboard.

Honest first: aider has no MCP support. There is no /mcp command in the in-chat commands, nothing about servers in the config docs, and the requests for it are still open issues, so any page telling you to paste an MCP block into .aider.conf.yml is inventing it. The path that actually works is /run: a curl against /v1/funnel, /v1/trends or /v1/retention with your read key puts the real figure in aider's context, and because the /v1 API, the MCP tools and the dashboard are pinned to the same answer by a CI test, the number aider sees is the dashboard's number.

For the instrumenting half, aider's strength is that it edits and commits. Write ANALYTICS.md with your event names and rules, pass it with --read, /add the files that need tracking, and use /ask to agree on the plan before /code makes the change. Each edit lands as its own commit with a message, so instrumentation is reviewable and /undo takes it back if the agent got carried away. Then smolanalytics plan check in CI fails the build when an event your tracking plan expects stops firing.

If you want the full ask-in-the-editor loop, run one MCP client alongside aider on the same repo (Claude Code, Cursor, Zed and Cline all take our org endpoint) and let aider keep doing the editing. Either way the data stays yours: one MIT Go binary you self-host free forever, or the cloud on a 14-day full trial with no card, then $49/mo for 1M events or $149/mo for 10M, $8 per extra million.

Honest pricing: 14-day full trial, no credit card. Then Pro $49/mo, never metered on seats or sites. Overage is $8/million with an emailed receipt, the dashboard never locks, and self-hosting the single Go binary is free forever (MIT).

Add analytics to Aider tonight.

One snippet, or one endpoint. Tomorrow morning the verdict tells you which part of the funnel to fix.

questions

How do I add analytics to Aider?
Aider pairs with you from the terminal, and unlike Cursor or Cline it ships no MCP client, so there is no server to register. What does work: aider writes the instrumentation from a conventions file you pass with --read, and you pull real numbers into the chat with /run curl against the /v1 API, which serves the same deterministic reports as the dashboard.
Do I need a cookie banner?
Not in cookieless mode. smolanalytics can run without storing anything on the device, so there is no consent banner to add. You still get visitors, referrers, funnels, retention, and paths, and AI-assistant referrals (chatgpt.com, claude.ai, perplexity.ai) show up as their own channel.
Is it enough for a real product, or just page counts?
It does funnels, retention, paths, cohorts, and a daily verdict on what to fix, from the same events, and you ask it in plain English. It also ships feature flags, A/B experiments, click heatmaps, in-product surveys, and a session inspector that replays a user's journey from their events; the one thing it skips is pixel-perfect DOM session recording. If you want a straight answer on what to fix, plus the full toolkit, that you own and can self-host free, it fits.

keep reading