Learn

How to ask your AI assistant about your analytics

Can I ask ChatGPT or Claude about my website traffic and revenue?

Using an AI coding tool?Point it at this page as markdown: ask-ai-assistant-about-your-analytics.md

Yes, if your analytics tool runs an MCP server. Add its URL to the assistant, sign in, and choose which sites it may read; the assistant then calls the tool's functions, which read unless you allowed changes, and answers with the same numbers as your dashboard. It beats pasting an export, because adding up daily visitors counts a returning visitor once for every day they came.

Why pasting an export goes wrong

The obvious way is to export a CSV or take a screenshot, paste it into the chat and ask. The assistant will answer, fluently, and some of the numbers will be wrong in ways that are hard to spot:

  • Visitors don’t add up. A daily export counts each visitor once per day. Someone who came on Monday and Thursday is in both rows, so the sum of a month’s days is larger than the month’s visitors. Ask for “visitors last month” and the assistant adds the column.
  • The arithmetic is the assistant’s. Rates, totals and comparisons are worked out in the chat, from whatever rows you happened to export, and quoted with the same confidence as the numbers that were in the file.
  • The file has no definitions. It doesn’t say which timezone a day is in, whether refunds were taken off revenue, or what counts as a visitor, so the assistant guesses.
  • It’s stale, and it’s everything. The export is out of date by the next question, and the provider now holds the whole file, not just the answers you needed.

What MCP changes

The Model Context Protocol (MCP) is an open standard that lets an assistant call tools another service provides. An analytics tool that runs an MCP server offers functions like “overview for a window” or “revenue by source”. When you ask a question, the assistant picks a tool, the analytics tool computes the answer from the raw data, and the assistant reads the result back to you.

The difference is who does the counting. A window’s visitors come from the tool, de-duplicated the same way as in your dashboard, and the assistant only has to quote them. Each question fetches fresh numbers, and only the ones it needs.

Connect Statlark

Statlark’s MCP server is at https://app.statlark.com/mcp. There’s nothing to create first:

  1. Add the URL to your assistant. In Claude it’s a custom connector, and in ChatGPT a custom MCP server. Claude Code, Cursor, VS Code, Codex, Devin Desktop and Antigravity take it too.
  2. The assistant sends you to Statlark to sign in.
  3. Pick the workspace and the sites it may read, then click Allow. Reading analytics is always on. Tick People only if it should also see your customers’ names, emails and lifetime value. Leave the change boxes unticked to keep it read-only.

In Claude Code, for example, it’s one command:

claude mcp add --transport http statlark https://app.statlark.com/mcp

The exact steps for each assistant, and how to use an API key with one that can’t sign in, are in AI assistants (MCP).

What to ask

Ask the way you’d ask a colleague who has the dashboard open:

  • “Which channel brought the most revenue last month?”
  • “Why did visitors drop this week?”
  • “Which landing pages convert best for the signup goal?”
  • “Are we on pace for this month's revenue target?”
  • “Which acquisition channel brings customers with the highest lifetime value?”
  • “What's the revenue per visitor from Google Ads vs organic search over the last 90 days?”
  • “Did last Tuesday's launch move signups?”
  • “Which pages do visitors click outbound links from, and which campaign sent them?”
  • “Who's on the site right now, and where did they come from?”
  • “Which Google searches bring visitors who end up paying?”

Name the window when it matters. “This month” and “the last 30 days” are different numbers. For “why did this change”, the assistant can ask Statlark which sources moved most, and whether each one sent more visitors or earned more per visitor, instead of comparing two lists itself.

How to check the answer

Every result Statlark returns states the date window, the timezone and the filters it used, and includes a link to the same view in your dashboard. So:

  • Ask for the window. If the assistant quotes a number without saying which days it covers, ask. A number from “the last 30 days” answers a different question from one for October.
  • Open the link. It shows the same window and filters in the dashboard, so you can check any number in a click.
  • Watch for caveats. Results flag small samples. A 40% conversion rate from five visitors is five visitors.
  • Be wary of new numbers. If a figure isn’t in any tool result, the assistant worked it out, and it deserves the same doubt as the pasted export.

What the assistant can see, and what it can do

  • It changes only what you allow. It reads unless you tick a change on the approval screen. Then it can add and remove annotations and set your primary goal and targets, and anything that replaces or removes what a person made waits for your approval in Statlark. It can never delete your analytics data, send email, or touch billing, keys or your team. submit_feedback only sends us a note, and the assistant is told to ask you first.
  • Only the sites you ticked. People data, meaning names, emails and lifetime value, stays out unless you allowed it.
  • Your provider sees the results. Whatever the tools return goes to the assistant’s provider, so connect one you trust with your analytics.
  • Some text comes from your visitors. Page paths, referrers and UTM values are whatever a visitor’s browser sent, and anyone can put “ignore your instructions” in a link’s UTM tag. Statlark marks those fields as untrusted in every result, so a well-behaved assistant treats them as data. It’s why every change that replaces or removes something waits for you, on a Statlark page, not in the chat.
  • You can take it back. A sign-in lasts up to 90 days, or until the assistant goes 30 days without using it. Disconnect it any time in Settings → Connected apps, and it stops working on its next request.

In a terminal, or for a coding agent

A coding agent that runs commands doesn’t need MCP. The Statlark CLI reads the same numbers, and --json gives the agent exact values to quote:

npx @statlark/cli login
npx @statlark/cli sources --json

For spreadsheets and scripts, the same key works with the REST API. And to see which AI crawlers are reading your site in the first place, see how to see which AI crawlers read your site.

Last reviewed