Skip to content
AI app builders

Lovable app analytics with revenue attribution

2 min read · Updated · By the Reveata team

Short answerAsk Lovable to add the Reveata script tag to the head of every page, in src/routes/__root.tsx for newer TanStack Start apps or index.html for older Vite apps, then publish. Connect your payment provider and paste Reveata's ready-made prompt so Lovable adds the visitor id to your checkout.

Lovable turns a description into a working app, often with sign-ups and Stripe payments in an afternoon. The next question is whether anybody comes, and who pays. Reveata answers both, and Lovable's own AI can do most of the setup.

What you get

  • Every page of the published app, including in-app navigation through the History API.
  • Revenue by channel and campaign from your Stripe checkout, once the visitor id travels with it.
  • Goals for sign-ups and trials, added by Lovable on request.
  • A first-party script address with a custom domain and the managed proxy, no code on Lovable.

How to install it

Which file holds the page shell depends on when the app was created:

App created Framework File
From May 2026 TanStack Start src/routes/__root.tsx, inside <head> after <HeadContent />
Earlier React with Vite index.html, before </head>

The simplest way is to ask Lovable in the chat to add the snippet exactly as written to the <head> of every page, without bundling it or changing its attributes. The exact prompt is in the Lovable install guide. Then Publish, or Publish → Update for a live app: the live app is a snapshot and doesn't change until you update it. Lovable's own documentation is at docs.lovable.dev (opens in a new tab).

In Reveata, add the website with your custom domain or your .lovable.app address. The editor preview is another address and isn't counted.

How payments are matched to visits

How the app takes payments What to do
Your own Stripe account (Lovable's Stripe integration) Connect it in Reveata, then paste the prompt from revenue in apps built with AI: Lovable adds the visitor id to the checkout metadata in your edge functions
Lovable's built-in payments on a Stripe account it set up Claim the account, connect it, and identify users by email after sign-in

The built-in checkout can't be changed, so its payments are credited by the user's email. Ask Lovable to call window.reveata?.('identify', { userId: user.id, email: user.email }) after sign-in.

Frequently asked questions

Lovable rewrote the tag into an import. Does that matter?

Yes. If the snippet becomes an import or a useEffect, its data-website-id can be lost. Ask Lovable to keep the plain <script> tag exactly as written.

Can I use built-in payments and my own Stripe integration together?

No, Lovable uses one or the other. Connect in Reveata the one your app uses.

How do I check it works?

Open the published app in a normal window, then Realtime in Reveata. If nothing arrives, view the page source and search for data-website-id.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?