Add product analytics to your Bolt.new app
How to Add Analytics to Your Bolt.new App
Add Amplitude to your Bolt.new app with a CDN snippet, Wizard CLI, or AI prompt. Get event tracking, funnels, retention, and Session Replay on the free Starter plan.
You built something with Bolt.new. People are signing up. Traffic is moving. But you open Bolt's hosting dashboard and all you see is a pageview count and some bandwidth numbers. You can't tell which features people actually use, where they drop off, or whether anyone comes back after day one.
That's not a Bolt problem. Bolt is a builder tool, not an analytics platform. The fix is adding product analytics that tracks events, identifies users, and shows you behavioral data like funnels, retention, and session recordings.
This guide walks through how to add Amplitude Analytics to your Bolt.new app. Three methods, same result: pick the one that fits how you work.
Why Bolt.new apps need more than pageview analytics
Bolt Hosting on paid plans includes basic analytics: unique visitors, pageviews, top pages, bandwidth usage, traffic sources, visitor locations, and a list of 404 pages. That data answers one question: "Is anyone showing up?"
It doesn't answer the questions that matter once people are in your app. You can't see which buttons they click, which screens they visit, or where they abandon a flow. There's no user identification, so you can't tell if the same person comes back tomorrow. And Bolt's docs note that the built-in analytics currently counts bot and crawler traffic alongside real users, with no way to separate them.
Product analytics fills that gap. Amplitude Autocapture starts collecting events the moment you add the snippet: page views, sessions, clicks, form submissions, network requests, web vitals, and frustration signals like rage clicks and dead clicks. No manual instrumentation. No writing onClick handlers to track button taps. The SDK watches what happens in your app and logs it automatically.
From there, you can build funnels to see where users drop out of your onboarding flow, run retention analysis to measure whether people stick around, and watch Session Replay recordings to see exactly what a confused user experienced. That's a different class of insight than "47 pageviews today."
How to add Amplitude to your Bolt.new app (CDN snippet)
The fastest way to get Amplitude running is a single script tag in your app's <head>. You don't need to install packages, configure a build step, or touch your project's dependency tree.
Step 1: Create a free Amplitude account if you don't have one. Go to Settings > Projects and copy your project's API key.
Step 2: In Bolt's chat, type a prompt like: "Add this script tag to the <head> of my app." Then paste the Amplitude CDN snippet from the Quickstart docs. Replace YOUR_API_KEY with the key you copied in Step 1.
The snippet enables the full Autocapture suite by default: page views, sessions, clicks, form interactions, network requests, web vitals, and frustration signals. Session Replay is included via the sessionReplay plugin.
Step 3: Deploy or preview your app. Open the Amplitude Debugger and confirm that page view, session start, and element interaction events are flowing.
That's it. One prompt, one snippet, and your app is tracking events, recording sessions, and capturing user behavior.
How to add Amplitude with the Wizard CLI
If you prefer a terminal-based setup that detects your framework and wires everything up automatically, the Amplitude CLI is the better fit. It works inside Bolt's built-in terminal.
Step 1: Open Bolt's terminal and run: npx @amplitude/setup-wizard
Step 2: The wizard prompts you for your Amplitude API key, then detects your framework (React, Next.js, Vite, or vanilla JS). It installs the correct SDK package, adds initialization code, enables Autocapture, and sets up Session Replay.
Step 3: The wizard fires a test event and confirms that data reached your Amplitude project before it exits. No guessing whether the setup worked.
The CLI also configures Amplitude MCP, which lets you query your analytics data directly from Claude, Cursor, or your terminal. Instead of switching to a browser dashboard, you can ask "What's my Day 7 retention for users who signed up this week?" from the same environment where you're building your app.
This method installs the full Amplitude stack: Analytics, Session Replay, Feature Experimentation, and Guides and Surveys. Everything from a single CLI command.
How to add Amplitude using an AI coding assistant prompt
Bolt.new is a chat-first builder. You describe what you want, and the AI writes the code. Adding analytics should work the same way.
Amplitude's Quickstart docs include a ready-made prompt designed for AI coding tools. Copy it, paste it into Bolt's chat (or Cursor, Claude Code, or Copilot), and the AI handles the rest. The prompt instructs the AI to install the browser SDK, initialize it with your API key, and enable Autocapture and Session Replay. No manual code editing.
After the AI applies the changes, deploy or preview your app and check the Amplitude Debugger to verify events are flowing.
This is the most Bolt-native workflow: you built the app by prompting, and you add analytics by prompting. Same pattern, same tool.
What to track beyond the defaults
Autocapture gives you a solid baseline the moment it's running. Clicks, page views, form submissions, sessions, web vitals, and frustration signals all flow without writing a line of tracking code. But the real value comes when you layer on custom events and user identification.
Custom events track the actions that matter to your business. If you're building a SaaS app with Bolt, you probably care about signups, onboarding completion, feature adoption, and purchases. Add them with one line: amplitude.track('Completed Onboarding', {plan: 'starter', steps_completed: 5}). You can prompt Bolt to add these calls wherever the relevant action happens in your code.
User identification connects anonymous sessions to real accounts. After a user logs in, call amplitude.setUserId('user-123'). Now you can track a single user's journey from their first visit through signup through activation. You can set user properties (plan type, company size, role) to segment your analysis later.
Funnels show you where users drop off. Build one in Amplitude that maps your critical path: visited landing page > signed up > completed profile > used core feature > invited a teammate. You'll see the exact step where people leave, and you can click into Session Replay to watch what happened.
Retention tells you whether people come back. Amplitude's retention chart shows Day 1, Day 7, and Day 30 return rates. For an early-stage app built with Bolt.new, this is the single most important metric to watch. High traffic with low retention means the app isn't sticky yet.
Session Replay lets you watch recordings of real user sessions. It's already enabled if you used the CDN snippet or Wizard CLI. When a user reports a bug or a funnel chart shows a sharp dropoff, you can pull up the session and see exactly what they saw.
Get started
Your Bolt.new app is live. Now you can see what's happening inside it. Add Amplitude, ship a few custom events for the actions that matter, and check your retention chart after the first week.
Try Amplitude for free today to start tracking events, watching session replays, and building funnels in your Bolt.new app.
Frequently asked questions about Bolt.new analytics
Yes. Bolt Hosting on paid plans shows unique visitors, pageviews, top pages, bandwidth, traffic sources, and visitor locations. It does not track events, identify users, or support behavioral analysis. It also counts bot and crawler traffic alongside real users, so the numbers can be higher than actual human activity.
Yes. Create a GA4 property, copy your Measurement ID, and prompt Bolt to add the gtag.js script to your app's <head>. GA4 tracks traffic, acquisition channels, and basic conversions. It does not offer the product analytics depth you get from Amplitude, like funnel analysis, behavioral cohorts, or Session Replay.
Amplitude is the strongest fit for product analytics. The CDN snippet takes one prompt to add, Autocapture starts tracking events without manual instrumentation, and the free Starter plan includes 10K MTUs and up to 2M events. For traffic-only analytics where you just need visitor counts, Bolt's built-in hosting analytics works fine.
After adding the Amplitude SDK, call amplitude.track('Event Name', {key: 'value'}) at any interaction point in your code. You can also prompt Bolt to add tracking calls for you, or rely on Autocapture to track clicks, form submissions, and page views without writing code.
Yes. Session Replay is included in both the CDN snippet and the Wizard CLI setup. It records user sessions and links them to Amplitude events. You can jump from a funnel dropoff directly into a replay of what that user experienced.
Yes. The Amplitude Starter plan is free and includes 10K monthly tracked users and up to 2M events. That covers most apps built with Bolt.new in their early stages. You get the full platform (Analytics, Session Replay, Feature Experimentation, Guides and Surveys) with volume limits, not feature limits.