BlogGuide

How to add analytics to a vibe-coded app

In this guide, we show you how to add analytics to an app built with Lovable, Bolt, Replit, v0 or Base44 in six steps, and what each builder already counts.

You described an app, the builder wrote it, and now it's live. Is anyone using it? And how far do they get before they leave?

Every big app builder now has an analytics page of its own, and for the first week that page is enough. The trouble starts when you want to follow people instead of visits, see a sign-up funnel, or look back further than a month. So you add a real analytics tool. On every builder that comes down to one prompt that puts a script in the right file.

This guide covers Lovable, Bolt.new, Replit, v0 and Base44, and each of them also has a full walkthrough of its own, linked from the table in step 1. There are six steps:

  1. Check what your builder already counts
  2. Find where your app's <head> lives
  3. Add the snippet with one prompt
  4. Allow the addresses your app is published on
  5. Publish and check it works
  6. Track sign-ups, people and funnels

We checked each builder's docs on 16 November 2026.

1. Check what your builder already counts

Here's what each builder's own analytics shows, and how far back you can look:

BuilderWhat its analytics countsHow far backFull guide
LovableVisits, pages, sources, countries, devices. Counts visits, not people90 daysLovable
Bolt.newVisitors, page views, pages, sources, locations, 404s. Paid plans on Bolt Hosting, bots included30 daysBolt.new
ReplitApproximate visitors, pages, referrers, countries, browsers, devices30 daysReplit
v0Vercel Web Analytics: pages, referrers, countries, devices. 50,000 events a month on Hobby1 month on Hobbyv0
Base44Visits, visitors, pages, referrers, locations, devices, custom events (3 on Free)7 days on Free, 60 keptBase44

All five tell you how much traffic arrived. None of them follows one person from a first visit through sign-up to a payment, and most stop at a month or two.

A separate tool fills that gap. We make Spreelytics, which is free up to 1 million events a month and keeps 13 months of data, with nothing to host, so the steps below use it. Other script-tag tools go in the same place.

2. Find where your app's head lives

Lovable, Bolt, Replit and most Base44 apps are React apps built with Vite, which load from one index.html, and the snippet goes in its <head>.

v0 is the exception. It writes Next.js, which has no index.html, so the script goes in the root layout, app/layout.tsx, through Next's Script component. Some newer Base44 apps run on TanStack Start and keep their <head> in src/routes/__root.jsx.

You rarely need to open the file yourself, because each builder's AI knows its own project. Naming the file in your prompt is enough.

3. Add the snippet with one prompt

Create an audience in Spreelytics and copy the snippet from Settings → Tracking script. It looks like this, with your own client key:

<script src="https://cdn.spreelytics.com/cdn/sdk/spreelytics-loader.js"></script>
<script>
  Spreelytics.init({ client_key: "YOUR_CLIENT_KEY" });
</script>

Then paste a prompt like this into the builder's chat, followed by the snippet:

Add these two script tags inside the <head> of index.html, in this order, before any other scripts. Don't change anything else.

On v0, ask for the Script component in app/layout.tsx instead. The v0 guide has the exact code. Base44 has one more switch to check, its Visitor tracking setting, which blocks added scripts when it's set to Off.

Builder apps change screens without reloading. The script counts a page view every time the address changes, so there's no router code to write.

4. Allow the addresses your app is published on

Spreelytics only accepts data from hostnames on the audience's Allowed domains list, in Settings → Details, so add the address the builder gave you, such as your-app.lovable.app, bolt.host, replit.app, vercel.app or base44.app, plus your custom domain.

The editor previews all run on other hostnames. Leave those off. Your own testing then stays out of the numbers.

5. Publish and check it works

Most builders don't push changes live on their own. Publish again, or Republish on Replit, so the live app carries the script, then open the live address in a normal browser window and click around. Within a few seconds, Settings → Tracking script in Spreelytics changes to Tracking is live and you show up on Realtime. If nothing arrives, look at the domains list first and your own ad blocker second.

6. Track sign-ups, people and funnels

Built-in analytics leaves this part out.

Clicks come first. Any button with a data-spree-track attribute sends an event named after its value, such as data-spree-track="signup_clicked", so there's no tracking code to write.

People take one more prompt. Ask the builder to call window.Spreelytics?.identify(user.email) after sign-in and window.Spreelytics?.reset() at logout. Their anonymous visits from before then join their profile, and you can open a timeline of everything one user did.

For the leak itself, make goals on the Goals page, one per step, and chain them on Funnels: landing page, sign-up click, first real action. Rework the screen with the biggest drop first. How to find where users drop off walks through reading one.

Final thoughts

Adding analytics to a vibe-coded app takes six steps:

  1. Check what your builder already counts
  2. Find where your app's <head> lives
  3. Add the snippet with one prompt
  4. Allow the addresses your app is published on
  5. Publish and check it works
  6. Track sign-ups, people and funnels

If the app takes payments, connect Stripe in Settings → Revenue and pass the visitor id into the checkout, and each payment is credited to the channel that earned it. How to see which marketing channel earned each Stripe payment has the code, and free web analytics you don't have to host compares the other hosted options.

See your own numbers today.

Free up to 1M events a month · no credit card

Contact

Tell us what you need.

A real person reads these. We usually reply within one working day.

Or email us directly at contact@spreelytics.com.