BlogGuide

How to add analytics to a Base44 app

In this guide, we show you how to add analytics to an app you built with Base44 in seven steps, from the AI chat prompt to your first funnel.

Base44 has analytics built in. Dashboard → Analytics shows visits, unique visitors, visit length, live visitors, top pages, referrers, locations and devices, and your app can send custom events with base44.analytics.track(). Stripe sales get a tab of their own.

The limits show up once you start marketing the app: there's no UTM or campaign breakdown, and Base44's docs send you to Google Analytics or another tool for it. History is kept for 60 days. On Free, you see only the last 7 of them, and 3 custom events at most.

This guide adds Spreelytics next to Base44's own numbers. It's free up to 1 million events a month, keeps 13 months of data on the free plan, and needs no server of your own. There are seven steps:

  1. Get your snippet
  2. Ask Base44 to add it
  3. Check the Visitor tracking setting
  4. Allow your app's domains
  5. Publish and check it works
  6. Identify people when they sign in
  7. Tag clicks and build a funnel

We checked the Base44 parts against docs.base44.com on 16 November 2026.

1. Get your snippet

Sign up for Spreelytics and create an audience for your app. Open Settings → Tracking script and copy the snippet. It's two script tags, with your client key in the second:

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

The key is public on purpose. It can only send data into its own audience.

2. Ask Base44 to add it

No tracking-code setting exists. Base44's docs tell you to ask the AI chat instead, and give a prompt for it. Open your app in the editor and paste a prompt like this one, adapted from Base44's own, with the snippet at the end:

Add this tracking code to my app. Put the <script> parts inside the <head> of index.html. Keep everything else in index.html as it is, and don't change the code.

On a paid plan you can also open index.html in the Code tab and paste the snippet into the <head> yourself. The Free plan lets you read the code but not edit it, so there the chat is the way.

Some newer Base44 apps run on TanStack Start and have no index.html, and if the chat tells you that, ask it to put the scripts in the <head> of the root route, src/routes/__root.jsx.

Both kinds of app change pages without a reload. The script counts each address change as a page view. No router code needed.

3. Check the Visitor tracking setting

Open Dashboard → Settings → Advanced Capabilities → Visitor tracking. It has three options. Off blocks tracking code you added yourself, Spreelytics included, so make sure it isn't on Off.

On after visitor consent holds back Base44's own tracking until the visitor agrees. It doesn't hold back yours. Spreelytics starts every new audience cookieless and stores nothing in the browser, and Privacy explains when you'd turn its one first-party cookie on.

As we write this, Base44's docs say visitor tracking is paused for all apps and the setting can't be changed, so check the page again if it looks different when you read this.

4. Allow your app's domains

Spreelytics only takes data from the hostnames on the audience's Allowed domains list, in Settings → Details. Add each address your app is published on:

  • your-app.base44.app
  • your custom domain, if you connected one, with and without www if you use both

If you rename the app's address under Dashboard → Domains, the old link stops working at once. Put the new one on the list the same day.

Base44 doesn't count the editor preview, and neither do we, since it runs behind a preview token on a different address.

5. Publish and check it works

Changes from the chat or the Code tab go live only when you click Publish.

Then open the published app and click around. Within a few seconds, Settings → Tracking script in Spreelytics switches to Tracking is live, and you show up on the Realtime page. No data? Check the domains list, then the Visitor tracking setting, then your own ad blocker.

6. Identify people when they sign in

Base44 handles sign-in for you, and the app can read the signed-in user with base44.auth.me(). Pass their email on. Visits from before they signed up then join their profile in Spreelytics. Ask the chat:

After a user signs in, get them with base44.auth.me() and call window.Spreelytics?.identify(user.email). When they log out, call window.Spreelytics?.reset().

Each person then has a timeline: the channel that first brought them, every page and click, and what they paid. Identify users lists the other details you can save.

7. Tag clicks and build a funnel

You can mark a button without writing tracking code. Any element with a data-spree-track attribute sends an event named after its value whenever it's clicked:

Add data-spree-track="signup_clicked" to the sign-up button and data-spree-track="checkout_started" to the buy button.

A funnel is built from goals. Make them on the Goals page, each a page path such as /pricing or one of those events. Then put them in order on the Funnels page, for example:

  1. visited /
  2. signup_clicked
  3. checkout_started

The funnel counts back over events you already have, so the step where most people stop shows up the same day, and that's the screen to work on next.

Final thoughts

Adding analytics to a Base44 app takes seven steps:

  1. Get your snippet
  2. Ask Base44 to add it
  3. Check the Visitor tracking setting
  4. Allow your app's domains
  5. Publish and check it works
  6. Identify people when they sign in
  7. Tag clicks and build a funnel

Base44's Sales tab totals your Stripe payments. To see which channel earned each one, connect Stripe in Settings → Revenue and ask the chat to put the visitor id into the checkout session's metadata. How to see which marketing channel earned each Stripe payment lists the fields.

Built with something else as well? How to add analytics to a vibe-coded app covers Lovable, Bolt, Replit and v0.

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.