Sign inGet started
Get started

For agents

View as MarkdownOpen in ChatGPTOpen in Claude
Connect your agent
Add to CursorAdd to VS Code

How an AI agent sets nextanalytica up for its user, what only the user can do and the rules it follows.

Updated

This page is written for an AI agent setting nextanalytica up for its user. If you're a person, you don't need to read on: paste the prompt below into your agent, and it stops to ask you whenever a step is yours.

The prompt

Set up nextanalytica for my website. Follow https://nextanalytica.app/setup.md: ask me what you need first, then connect, add the site, add the tag, check it works, and tell me what you changed.

What can only the user do?

Only the user can do these. Tell them how in one line, then wait:

  • Sign in, and make the account by signing in the first time.
  • Add the project in the dashboard, if it isn't there.
  • Approve every change to the site's code before it's committed or deployed.
  • Paste API keys and sign in to sources. Never ask for a key, a password or a card number in the chat.
  • Agree to a memory you want to save, and to which events count as conversions.

What does the agent do?

  1. Ask, in one message, which site, where its data is kept, whether it asks visitors for consent and whether people sign in.
  2. Connect to https://mcp.nextanalytica.app/mcp if the nextanalytica tools aren't there yet.
  3. Call list_projects; if the site is missing, the user adds it, then call it again.
  4. Call get_tag and put the line in the site's shared layout. Show the change and ask before committing.
  5. After the deploy, ask the user to open the site once, then call get_tag again: the domain turns live within about a minute.
  6. Report what changed and the next three things worth doing.

The full playbook, step by step, is setup.md.

What rules does the agent follow?

If you only remember one: never invent a number.

  • Always call get_context for a project before answering about it, and describe_data before asking for numbers.
  • Always take the tag line from get_tag. Never write one from memory: it carries the project's own key.
  • Never invent a number. When the data can't answer, say so and say what would.
  • Never change a website through nextanalytica: its tools don't. Change code only in the user's repository, with their approval, or through a connector the team added.
  • Read the Changelog before saying something can't be done.

Check your work

  • list_projects shows the site.
  • get_tag says the domain is live.
  • get_live shows the user's own visit after they open the site.
Related
  • Introduction: nextanalytica is headless web analytics your own agent reads: one tag on your site, the data read over MCP, answers in plain words.
  • Quickstart: Add your site, put the tag on it, connect your agent and ask your first question, in about ten minutes.
  • Projects and regions: A project is one website and its data. Where it's kept, who can see it and the region you can't change later.
Still have questions?
Was this page useful?