What this page covers
On Replit, Agent writes the code and Replit provides the infrastructure. This page is about measuring what people do in the app you built there, which is the measure step of the vibe coding loop.
Facts about Replit come from the Replit docs, last checked December 4, 2026.
You need an Orwel workspace (the Free plan is enough to start) and your project open in Replit.
What Replit's own analytics covers
Replit has Project Analytics (Tools, then Growth), which you enable when you publish. Custom events need a paid plan. It covers traffic to the published app. Feature adoption, funnels with steps in any order and scored leads are what Orwel adds.
Step 1: Put the rules in replit.md
Replit Agent reads a replit.md file at the project root, and creates one if it is missing. It does not pick up copies in subfolders. Paste the rules block from the CLAUDE.md analytics template into it. The rules tell the agent to use event codes from your catalog, fire them after the action succeeds and await conversions.
Step 2: Store the key as a secret
Open Tools, then Secrets, and add a new secret. Use the development key (orwel_dev_...) while you build, with the name your framework expects:
| Framework | Variable |
|---|---|
| Vite (React, Vue, Svelte) | VITE_ORWEL_KEY |
| Next.js | NEXT_PUBLIC_ORWEL_KEY |
| SvelteKit, Astro | PUBLIC_ORWEL_KEY |
| Nuxt 3 | NUXT_PUBLIC_ORWEL_KEY |
Replit exposes secrets to your app as environment variables. The prefix is what makes your framework pass the value to browser code, which is where the Orwel SDK runs. That is safe for Orwel's development and production keys: they can send events and cannot read data.
If your project is plain HTML with no build step, use the script tag guide and put the production key directly in the script.
Step 3: Ask Agent to install and instrument
Replit installs packages when you ask Agent, or from the Shell with npm install orwel. Open the install overview, pick the guide for your framework and paste its agent prompt. It asks Agent to install the package, create one wrapper module, initialize once on the client, identify users when they sign in and await a conversion when a form is submitted.
If you defined journeys or features in Orwel first, paste the prompt from their Implement tab instead. It lists every event code and when to fire it. More prompts are in vibe coding prompts.
Step 4: Verify in Dev mode
Run the app, then sign up, use each tracked action and submit a form. Open Dev mode in Orwel:
- Errors mean rejected, for example
event_not_found. - Warnings mean accepted with a problem, for example
conversion_no_email.
Paste any warning back to Agent; the rules in replit.md tell it what to fix.
Step 5: Publish with the production key
Secrets from the editor do not carry over to a published app automatically. When you publish, open Publishing, then Adjust settings, and add the same variable under the production app secrets with the production key (orwel_...). Static deployments have no secrets, so for a static site put the production key in the code; it is public.
Step 6: Connect the Orwel MCP server
In Orwel, open Settings, API keys and create a key with the mcp scope. In Replit, open Settings, Integrations, Your integrations, Add custom, Add personal MCP server and paste https://api.orwel.io/mcp. Under Advanced settings add a custom header:
- Key:
Authorization - Value:
Bearer orwel_sk_...
Then ask before you build: "Check Orwel for conversions and detected issues in the last 14 days, then propose the next change." On the Free plan the server answers with aggregated data; individual leads and visitors need Pro. That closes the vibe coding feedback loop.