Getting Started

One link in your agent, one sign-in, and your agent installs the tracker.

1. Add the link to your agent

Staats is one link for every agent: https://api.staats.ai/mcp. Add it once and it works in every project. In Claude Code:

claude mcp add --scope user --transport http staats https://api.staats.ai/mcp

Codex, Cursor, VS Code and other clients are on the MCP Server page.

2. Sign in from your agent

Ask your agent to add analytics. The first time it connects it asks you to sign in: continue with GitHub or Google (that creates your account if you’re new) and allow the agent. In Claude Code, run /mcp and choose Authenticate. There’s no key to copy.

Every account starts free: 10,000 events a month, 1 site and 30 days of history, with no card. Funnels, journeys and revenue come with paid plans.

3. Let it install the tracker

Your agent creates the site and adds its script tag to your page head:

<script defer data-site="YOUR_SITE_CODE" src="https://www.staats.ai/s.js"></script>

The script is about 1.8 KB compressed, sets no cookies and stores nothing on your visitors’ devices. Add one paragraph to your privacy policy: your agent gets the wording when it adds the site. Once the tag is live (local development is never recorded), pageviews arrive straight away, including client-side route changes in single-page apps, and your agent shows you the first one.

Two things worth knowing up front: leave the tag off your 404 page, and exclude your own visits so your browsing doesn’t skew your own numbers.

4. Ask

From then on, ask in the conversation you’re already having:

  • “How did the launch go?”
  • “Where did yesterday’s traffic spike come from?”
  • “Did last week’s change to the pricing page work?” (the agent compares up to a week before and after the commit, and says when it’s too early to tell; see Agent Workflows)
  • “Track clicks on the new signup button” (the agent adds a data-staats attribute; see Tracking)

A new site has little data, and your agent says so: comparisons become meaningful after a week or two of traffic.