Replit analytics for apps built with Replit | Orwel
Best practices Updated December 4, 2026

Replit analytics: add Orwel to an app built with Replit Agent

To add analytics to a Replit app, put the Orwel rules in replit.md, store the key as a secret with the variable name your framework uses, ask Replit Agent to install and instrument, verify each request in Dev mode, add the production key to the published app's secrets and connect the Orwel MCP server.

Orwel is an event analytics SDK for startups, developers and vibe coders that maps feature adoption and conversion funnels, and feeds the results back to AI agents through MCP.

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.

Why Orwel

One plan

49 USD a month, 2 USD less every paid month down to 35 USD, or 420 USD a year

No caps

Unlimited leads and visitors under fair use

2-minute install

One script or npm package, or ask your coding agent to do it

MCP server

Claude, Cursor or your own agent read real usage before the next prompt

Semantic catalog

257 ready events, so tracking is named the same in every project

Dev mode

A live debugger and development keys that keep tests out of real data

FAQ

Does Replit have built in analytics?

Yes. Project Analytics covers the published app's traffic, and custom events need a paid plan. It does not report feature adoption or funnels.

How do I add analytics to a Replit app?

Add the Orwel rules to replit.md, store the key as a secret and paste the Orwel install prompt for your framework to Replit Agent.

Why do my events stop after I publish?

Secrets from the editor are not copied to the published app. Add the variable again under the production app secrets when you publish.

Where do rules for Replit Agent go?

In replit.md at the project root. Agent does not read copies in subfolders.

Can Replit Agent read my Orwel data?

Yes. Add https://api.orwel.io/mcp as a personal MCP server with an Authorization: Bearer header carrying an API key that has the mcp scope.

Keep reading

See what users do with what you shipped

Install in 2 minutes. Free to start, no card needed.