A Replit app can be anything from a Vite front end to a Flask or Express server, so there is no single file to edit. The Replit Agent knows your project, which is why the easiest install is a prompt.
What you get
- Every page of the deployed app, including single-page navigation.
- Revenue credited to visits from Replit's Stripe integration.
- A first-party proxy in your own backend, because Replit apps have a server.
- Goals added by the Agent on request.
How to install it
Ask the Agent to add the snippet exactly as written to the <head> of every page, by finding the one file that renders the head for all pages and adding it there once. The exact prompt is in the Replit install guide. The file depends on your stack:
| Stack | File |
|---|---|
| Vite or plain HTML | index.html (React, Vue) |
| Next.js | The root layout (Next.js) |
| Flask or Django | The base template (Flask, Django) |
Then publish, or Republish a live app. In Reveata, add the website with your custom domain or the .replit.app address. The workspace preview is another address and isn't counted. Replit's own docs are at docs.replit.com (opens in a new tab).
How payments are matched to visits
Replit's Stripe integration takes payments into your own Stripe account, a sandbox while you build and your live account once you publish:
- Connect the same live Stripe account in Reveata (Stripe revenue analytics).
- Paste the prompt from revenue in apps built with AI into the Agent. It sends
window.reveata.metadata()with the checkout request and adds the visitor id to the checkout metadata.
If your backend records payments itself, it can post them to the Payments API instead. Sandbox payments are not imported from your live account.
A proxy in your own backend
Ask the Agent to follow the proxy guide for your server, such as Express or Flask. Store the proxy secret in Secrets as REVEATA_PROXY_SECRET. Replit puts your app behind its own proxy, so read the visitor's address from the first entry of X-Forwarded-For. Or use the managed proxy with a custom domain.