# Install on Bolt

> Bolt scaffolds Vite projects: paste the tag into index.html, or the root layout for a Next.js app.

Section: Installation guides  
Canonical page: https://statsy.co/docs/install/bolt  
Last updated: 2026-09-15

Bolt usually scaffolds a Vite project with a single HTML shell, and that file is where the tag goes. Because the shell is shared by every route, one paste covers the whole app.

## Where it goes

Open `index.html` in the file tree and paste the tag inside `<head>`. If Bolt generated a Next.js app instead, follow [Install on Next.js](https://statsy.co/docs/install/nextjs) and use the root layout.

```html
<head>
  <meta charset="UTF-8" />
  <title>Your startup</title>
  <script defer data-website-id="ws_XXXXXXXX" data-domain="yourstartup.com" src="https://statsy.co/js/script.js"></script>
</head>
```

You can also ask Bolt in the prompt box to add the tag to the head of index.html, exactly as written.

## Confirm it works

Deploy to your own domain and open it, then check **Live**. Route changes in the app are counted automatically, because the script watches the History API. See [Single-page apps and route changes](https://statsy.co/docs/tracking-script/spa).

## The in-editor preview does not report

Bolt’s preview runs on its own sandbox host, and beacons from a host that is not your domain are dropped. That is convenient: you can build all day without polluting your numbers. Measurement starts when you deploy to the domain in `data-domain`.

Previous: [Install on v0](https://statsy.co/docs/install/v0)  
Next: [Install on Replit](https://statsy.co/docs/install/replit)