What this page covers
This page is about adding product analytics to an app you build with Cursor, not about Cursor's own usage dashboard.
Cursor's agent edits your repository from the editor. With Orwel it can instrument the app correctly and, once the MCP server is connected, read real usage before you plan the next change. That is the measure step of the vibe coding loop.
You need an Orwel workspace (one Pro plan with a 14-day trial) and your project open in Cursor.
Step 1: Give Cursor the rules
You have two options, and they combine well.
The Orwel skill. From the project root:
npx skills add hyperlabs-ai/hyper-skills/orwel
It works with agents that support skills, and teaches the agent the full SDK and its rules.
A project rule. Cursor reads project rules from .cursor/rules, as .mdc files, and also reads an AGENTS.md at the project root. Create .cursor/rules/orwel.mdc and paste the rules block from the CLAUDE.md analytics template under a short front matter:
---
description: Orwel analytics rules for track, identify and conversion
alwaysApply: true
---
(paste the Orwel rules block here)
With alwaysApply: true the rule is included in every chat. If you only want it when Cursor touches certain files, use globs instead, for example your services folder. Older projects may still have a .cursorrules file at the root; the current Cursor docs describe .cursor/rules and AGENTS.md.
Step 2: Put the key in an environment variable
Copy the development key (orwel_dev_...) from your workspace into .env with the name your framework uses:
| Framework | Variable |
|---|---|
| Next.js | NEXT_PUBLIC_ORWEL_KEY |
| SvelteKit, Astro | PUBLIC_ORWEL_KEY |
| Vite (React, Vue, Svelte) | VITE_ORWEL_KEY |
| Nuxt 3 | NUXT_PUBLIC_ORWEL_KEY |
Add an empty line for it in .env.example and make sure .env is in .gitignore. In production, set the variable to the production key (orwel_pk_...) in your hosting provider.
Step 3: Ask the agent to install and instrument
Open the agent and paste:
Install Orwel in this project following the Orwel rules. Read the key from the env var for this
framework, create one wrapper module and init once on the client. Identify users when they sign
in and await a conversion with the email when they submit the contact form. Then propose an
event catalog from the service layer and wait for my confirmation.
Review the diff like any other agent change. Check that track() codes come from the catalog, that events fire after the action succeeds and that conversions are awaited. More prompts for signup funnels, feature usage, purchases and audits are in vibe coding prompts.
If you designed journeys or features in the dashboard first, copy the agent prompt from their Implement tab instead. It lists every configured code, when to fire it and how to verify it. Custom codes must be registered (saved in a journey or feature) before you ship code that sends them.
Step 4: Verify in Dev mode
Ask the agent to run the app with the development key and debug: true, then trigger a sign in, each tracked action and one form submit. Open Dev mode in the Orwel dashboard and check every request:
- Errors mean rejected:
event_not_found,invalid_field,missing_session_id. - Warnings mean accepted with a problem:
conversion_no_email,missing_attribution,identify_no_email. test_mode_integrations_skippedis expected with the development key.
Paste any warning back into Cursor; the rules tell the agent what to fix. Deploy with the production key once Dev mode is clean.
Step 5: Add the Orwel MCP server to Cursor
In Orwel, open Settings, API keys and create a key with the mcp scope, set to server only. In Cursor, open Settings, Cursor Settings, MCP and add a global server, or create .cursor/mcp.json at the project root:
{
"mcpServers": {
"orwel": {
"url": "https://api.orwel.io/mcp",
"headers": { "Authorization": "Bearer orwel_sk_..." }
}
}
}
That key reads customer data. If you use the project file, keep it out of version control, or use the global setting instead. The server is scoped to the key's workspace and needs an active subscription or trial.
Step 6: Ask Cursor about real usage
With the server connected, the agent can query your workspace:
- "Who are my top leads this month and why?"
- "Show conversions and the issues Orwel detected in the last 14 days."
- "Which campaign brought qualified leads?"
The tools return leads, lead analytics, visitors, conversions, campaigns, detected issues and lists. Feature adoption and journey reports are in the dashboard, so paste those numbers when the next change depends on them. That closes the vibe coding feedback loop.