Paste this into your agent
Open your app’s folder in Claude Code (or another coding agent) and send it:
Add Togo analytics to this app. Instructions: https://www.togohq.ai/agents.md
That is the whole install. The agent reads the instructions at www.togohq.ai/agents.md, connects itself to Togo, and does the rest. You only step in for three things: signing in, answering a question when it is unsure, and deploying.
What you will be asked to do
- Start a new session and sign in. Claude Code installs the Togo plugin, then asks you to
start a new session in the same folder, run
/mcp, choose plugin:togo:togo and sign in. Your browser opens Togo’s sign-in page. New to Togo? Sign up on the same page and you come back to the approval. - Approve access. The browser asks what the agent may do. Choose Read and change so it can set the project up; you can connect a read-only agent later for questions.
- Click through your app once, if the agent cannot run it. It needs each flow — sign up, the main action, purchase — to happen once, with the test key, so it can check the events.
- Deploy. The agent puts the live key in production builds. After you deploy, it confirms the first live events.
What the agent does
The instructions point it at the setup playbook on Togo’s MCP server
(get_setup_instructions). In order, it:
- Finds your project — by the write key already in your code, or the empty project your signup made. One product is one project: its website, apps and server together.
- Gives this part of your system its own pair of write keys, named for it (
web-app,api-server). - Defines your tracking plan before writing code: each event with what it means and when it fires, and each profile property. It reads the flows in your code, and any PostHog, Mixpanel or Amplitude calls already there. That plan is what keeps your data trustworthy — Event governance.
- Installs
@togohq/sdk-browserfor browser code and@togohq/sdk-nodefor server code, with the test key in development and the live key in production, both read from environment variables. - Adds
identify()at sign-in andreset()at sign-out. - Proves it: runs the flows and checks that run with
verify_tracking, fixing what it reports until every expected event, identify call and profile property has arrived with nothing to fix. - Tells you what it defined, which keys each system uses, and anything it created.
Which agents work
Claude Code runs the whole flow, end to end — Connect Claude Code. Any agent that can add a remote MCP server with OAuth sign-in follows the same instructions — see Other agents. Prefer to install by hand? Start from Next.js, React or plain HTML.
What the agent never asks you for
A secret key, an admin key or an API token. Togo’s write keys are public and can only send events; the sign-in your browser approves is the only credential the agent holds. Anything that asks you for a secret to install Togo is not Togo.