# Install on Lovable

> Ask the Lovable agent to add the tag to index.html, then publish and connect your own domain.

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

Lovable projects are React apps with a single HTML shell, so the tag goes in that file like any other Vite app.

## Where it goes

Ask the agent in the chat, or edit `index.html` yourself in the code view. A prompt that works:

```text
Add this analytics tag to the <head> of index.html, exactly as written, and nothing else:

<script defer data-website-id="ws_XXXXXXXX" data-domain="yourstartup.com" src="https://statsy.co/js/script.js"></script>
```

Then publish the project.

## Confirm it works

Open the published site and check **Live**. If nothing arrives, view source and confirm the tag survived the last agent edit.

## Connect your domain first

A project published to a `lovable.app` address sends beacons from a host that is not your domain, and they are dropped. Connect your custom domain and set `data-domain` to it, or add the Lovable host under **Site settings › General › Additional domains** while you are still testing.

> **Tip.** Agents like to rewrite files. After a big change, check the tag is still in `index.html` and still appears exactly once.

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