Products

How to Add Product Analytics to Your App Without a Developer

Your AI coding assistant can detect your framework, install the SDK, configure your entry file, and verify the integration automatically. Here's exactly what happens when you run the prompt.

How to Add Product Analytics to Your App Without a Developer — Adtivity Built This Week cover, Friday June 5 2026.

Setting up analytics is one of those things every founder knows they should do and almost nobody actually does on day one. Not because we don't care. Because the process is deeply annoying, so we push it until someone asks a question we can't answer — like "where are users dropping off?" — and then we spend a Wednesday afternoon in docs we don't understand.

Ola and I [Jae] built Adtivity because I kept hitting that wall. So we built the Adtivity MCP: point your AI coding assistant at it, say "install Adtivity into this project," and watch it do the whole thing for you. No manual SDK setup. No digging through docs. No terminal commands you half-understand.

What the Adtivity MCP Actually Is (In Plain English)

MCP stands for Model Context Protocol. That's a fancy way of saying: a plugin your AI coding assistant (Claude, Cursor, Windsurf) can use to talk to external services on your behalf. When you add the Adtivity MCP to your AI tool, your AI gets five new capabilities specifically for setting up and working with Adtivity.

Think of it like hiring a contractor who already knows the building code. You tell them what you want built, and they handle the paperwork.

There are two parts to Adtivity: the SDK, which lives inside your app and captures what your users are doing, and the MCP, which lives inside your AI tool and handles the setup, installation, and querying for you. Most of the time you only touch the MCP directly — it manages the SDK for you.

Before You Start: What You Actually Need

Three things, and only three:

1. An Adtivity account and API key. Sign up free at adtivity.xyz, go to Settings → API Keys, and copy your key. Keep this tab open — you'll need it in a moment.

2. An AI coding assistant. Claude Code (the terminal-based version of Claude built for coding), Cursor, or Windsurf all work. If you already use one of these to write code, you're good. If you don't — Claude Code is the easiest to start with; install it from claude.ai/code.

3. An existing project with a package.json file. If you're building in Next.js, React, Vue, Express, or React Native, you have this. Not sure? Open your project folder, look for a file called package.json. If it's there, you're set.

No paid plan required to start. No database to set up. No data team needed.

Step 1: Add the Adtivity MCP to Your AI Tool

This is the only time you'll need your terminal (the command-line window on your computer). On Mac, open Terminal — it's in Applications → Utilities. On Windows, use PowerShell.

Run this single line:

Claude Code (Recommended)
claude mcp add adtivity -- npx adtivity-mcp

That installs Adtivity for the project you're currently in. To use it across every project on your computer (what most founders prefer), add --scope user:

Globally (All Your Projects)
claude mcp add --scope user adtivity -- npx adtivity-mcp

If you're on Cursor or Windsurf, add it via a config file instead. Open (or create) ~/.cursor/mcp.json — on Mac, that's your home folder, then .cursor, then mcp.json. Paste in:

Cursor / Windsurf — ~/.cursor/mcp.json
{
  "mcpServers": {
    "adtivity": {
      "command": "npx",
      "args": ["adtivity-mcp"]
    }
  }
}

Want to confirm it's working before connecting it to your AI? Run npx adtivity-mcp in your terminal. The window will pause — that means it's ready and listening. Press Ctrl+C to exit.

Step 2: Open Your Project and Run One Prompt

Open your project in Claude Code or Cursor. Then type this:

Prompt to Your AI
"Install Adtivity into this project. My API key is [paste your key from Settings → API Keys]."

That's the whole prompt. Your AI takes it from there.

Step 3: Watch What Your AI Does (And Why)

The MCP gives your AI five tools that run in sequence. You'll see it working through them and narrating what it's doing. Here's what each one actually does:

What your AI callsWhat it actually does
detect_frameworkReads your project files to identify your framework — Next.js, React, Vue, Express, or React Native — and finds the right file to patch.
install_sdkRuns npm install @adtivity/adtivity-sdk (or yarn/pnpm/bun, whichever your project uses). No manual install.
write_init_codeCreates the provider file or patches your entry file with initialization code, page tracking, and click tracking — wired to your API key automatically.
wrap_eventGenerates ready-to-paste tracking snippets for specific user actions — signups, upgrades, checkout, whatever you need.
verify_integrationChecks that the SDK is installed, the init code is in place, and the API key is configured. Returns a pass/warn/fail checklist so you know exactly what's working.

When it's done, your AI will show you the verification checklist. Green across the board means analytics is wired and running. If something flags yellow or red, your AI will tell you exactly what to fix and usually offer to fix it directly.

The whole sequence takes about 60 seconds on a clean project — a bit longer if your setup is unusual, but the AI adapts to what it finds rather than making you pick from a list of supported configurations and hoping yours is on it.

Step 4: Connect Your Revenue (Takes 90 Seconds)

Tracking user behavior is half the picture. The other half is knowing whether those users are paying you, and whether they're staying. For that, connect Stripe or Paystack from the dashboard → Settings → Connections. It's an OAuth flow: click a button, authorize, come back. No code needed.

Once connected, your MRR, ARR, and churn numbers auto-populate and become queryable through the MCP. You can ask your AI "what's my MRR this month?" and get an actual number back. That part is genuinely wild the first time it works.

What You Can Ask Your AI Once It's Set Up

After setup, you can use the MCP tools individually — your AI will know what to do. A few prompts that work well:

Prompt Examples
"Add Adtivity event tracking to my checkout button."
→ The AI calls wrap_event and pastes a ready-to-use snippet
  directly into the component. You don't touch the SDK docs.

"Is Adtivity set up correctly in this project?"
→ The AI runs the verify tool and gives you a pass/warn/fail
  checklist. Useful after any code change where you're not
  sure if you broke something.

"What framework is this project using?"
→ The AI calls detect_framework and summarizes what it found.
  Small but useful when you're onboarding a new project.

We're also adding more MCP capabilities as Adtivity grows — more tools, more ways to query your data, more things your AI can do for you without leaving the conversation. If there's something you want that isn't there yet, ask your AI to request it. The MCP routes it directly to the team, and someone comes back within 48 hours with either the solution or a timeline on when it ships. That's not a policy. It's just how we build.

Questions People Actually Ask

"npx: command not found" — what do I do?
You need Node.js installed. Go to nodejs.org, download the LTS version, run the installer, and try again. Takes about 3 minutes.

My terminal window froze when I ran npx adtivity-mcp. Did something break?
Nothing broke. When the window pauses, that means the MCP is ready and listening. Press Ctrl+C to exit. You're good.

My AI said it installed Adtivity but I don't see any data in the dashboard.
Run the verify prompt: "Is Adtivity set up correctly in this project?" The most common cause is a missing API key in the environment variables, which the verify tool will flag and explain how to fix.

I'm on Cursor and I don't know where the mcp.json file is.
On Mac, press Cmd+Shift+G in Finder and type ~/.cursor to navigate there. If the file doesn't exist yet, create a new text file named mcp.json and paste the config block from Step 1 into it. Save, restart Cursor.

My framework isn't Next.js or React — will this still work?
Vue, Express, and React Native are all supported. If the AI flags an unsupported framework, it'll tell you and suggest the closest manual setup path rather than silently failing.

Why does any of this matter — can't I just use Google Analytics?
You can. Google Analytics is great for web traffic. But it won't tell you whether your users are coming back, which ones are paying, or what's driving churn — and it won't let you ask those questions in plain English inside the AI tool you're already using to build. The founders who understand their product best aren't always the ones with the most data. They're the ones who actually look at it. The hard part has always been cutting the friction between "I should check this" and actually seeing the number. That's what this is for. You shouldn't need to hire a developer to know whether your users are coming back.

Try Adtivity

See your product metrics in minutes.

No developer needed. Connect your app, get your dashboard, and understand your users from day one.

Sign up free →
Read next