Skip to content
AI app builders

v0 app analytics with Reveata

2 min read · Updated · By the Reveata team

Short answerAsk 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.

v0 generates Next.js apps with the App Router and deploys them to Vercel. That means Reveata on a v0 app is Reveata on Next.js, set up through v0's chat instead of your editor.

What you get

  • Every page view, client-side navigation included.
  • Payments from your Stripe account credited to visits once the checkout passes the visitor id.
  • Goals for sign-ups and trials, added by prompt.
  • Optional first-party serving with Next.js rewrites or the managed proxy.

How to install it

Ask v0 to import Script from next/script in app/layout.tsx and add the Reveata tag inside <body> after {children}, exactly as written:

tsx
<Script src="https://reveata.com/js/script.js" data-website-id="ws_your_tracking_id" strategy="afterInteractive" />

Or edit app/layout.tsx in v0's code view or the connected GitHub repository. Then publish: the first Publish creates the Vercel project, and later changes go live with Publish → Publish Changes or by merging the pull request. v0's own docs are at v0.app/docs (opens in a new tab).

In Reveata, add the website with your custom domain or the production .vercel.app address. Preview deployments run on other addresses and are refused unless you add them as additional domains, which keeps testing out of your numbers.

How payments are matched to visits

v0 adds Stripe through the Vercel Marketplace, starting as a Stripe sandbox that you claim into a Stripe account for production. The checkout code is in your Next.js app:

  1. Connect the live Stripe account in Reveata (Stripe revenue analytics).
  2. Paste the prompt from revenue in apps built with AI into v0. It sends window.reveata.metadata() to the route or server action that creates the checkout and puts the visitor id in its metadata. The server side is shown in Next.js analytics.

Payments in the Stripe sandbox are not imported from your live account, so claim the sandbox before you launch.

Serving the script from your own domain

Frequently asked questions

Are preview deployments counted?

No, unless you add their addresses under Settings → General → Additional domains.

My changes in v0 aren't live. Why?

Edits reach the live app only with Publish Changes or a merged pull request.

Can I use the @reveata/next package instead?

Yes. A v0 app is a Next.js app, so the package's component and server helpers work as described in Next.js analytics.

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?
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.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.IntegrationBolt app analytics with revenue attributionAsk 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.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.