Skip to content
AI app builders

Bolt app analytics with revenue attribution

2 min read · Updated · By the Reveata team

Short answerAsk Bolt to add the Reveata script tag to the head of index.html, or the root layout for Next.js and Astro projects, then publish again. Connect your payment provider and paste Reveata's prompt so the checkout carries the visitor id.

Bolt builds and publishes full web apps from a prompt. Because the checkout code it writes lives in your project, Bolt can also add the one thing revenue attribution needs: the visitor id on each checkout.

What you get

  • Every page of the published app, including History API navigation.
  • Revenue credited to visits from Bolt's Stripe integration.
  • Goals for sign-ups and trials, added by prompt.
  • Your choice of first-party serving: the managed proxy, or Netlify redirects if you publish there.

How to install it

Bolt usually builds with Vite, which serves every page from index.html. Ask Bolt in the chat to add the snippet exactly as written to the <head> of that file (or the root layout for a Next.js or Astro project), without bundling it or changing its attributes. Or paste it before </head> yourself in code view. The prompt is in the Bolt install guide; Bolt's own help is at support.bolt.new (opens in a new tab).

Then Publish again: the published app doesn't change until you do. In Reveata, add the website with your custom domain or the .bolt.host address (or your Netlify address). The preview inside Bolt is another address and isn't counted. If routes come after a #, add data-hash="true".

If your project is Next.js or Astro, see Next.js analytics or Astro analytics.

How payments are matched to visits

Bolt's Stripe integration uses your own Stripe secret key and writes the checkout as functions in your project (Bolt Database or Supabase edge functions):

  1. Connect the same Stripe account in Reveata under Settings → Payments (Stripe revenue analytics).
  2. Paste the prompt from revenue in apps built with AI into the Bolt chat. It sends window.reveata.metadata() with the request that creates the checkout and puts the ids in the checkout metadata on the server.
  3. Publish and make one test purchase from a link ending in ?ref=test.

In Stripe, the payment's metadata then shows reveata_visitor_id, and Reveata lists the payment with the source test. If the ids are missing, paste the prompt again with the name of the file that creates the checkout.

Frequently asked questions

Bolt moved the snippet into a TypeScript file. Is that a problem?

Yes. A bundled or imported tag loses its data-website-id. Keep the plain tag in index.html.

Can I use a payment provider other than Stripe?

Yes. The same prompt covers any provider Reveata connects to; connect it first (connect a payment provider).

How do I serve the script from my own domain?

With a custom domain, the managed proxy needs one DNS record. On Netlify, redirects can proxy it too.

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?
IntegrationStripe Checkout analytics and attributionAdd the Reveata visitor and session ids to the metadata of each Stripe Checkout Session your server creates. When Stripe reports the payment, Reveata reads the ids and credits the money to the exact visit that started the checkout.IntegrationNext.js analytics with revenue attributionAdd the Reveata script to your Next.js root layout with next/script, or use the typed Reveata component from @reveata/next. Client-side navigation is counted, and server helpers read the visitor id from Reveata's cookie so each checkout is credited to its visit.IntegrationAstro analytics with revenue attributionPaste the Reveata snippet with is:inline into the Astro layout that renders the head of every page. Astro then leaves the tag as written, view transitions are tracked, and payment links or checkouts started from your pages are credited to the visit behind them.IntegrationLovable app analytics with revenue attributionAsk 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.IntegrationReplit app analytics with revenue attributionAsk the Replit Agent to add the Reveata script tag once to the file that renders every page's head, then republish. Connect the payment provider your Replit app uses and paste Reveata's prompt so the checkout carries the visitor id.Integrationv0 app analytics with ReveataAsk v0 to add the Reveata Script component to app/layout.tsx, then publish. Client-side navigation is counted, and after you connect your payment provider, Reveata's prompt has v0 put the visitor id into the checkout metadata so each payment has a source.