Varde on Lovable
Ask Lovable to add Varde with one prompt. The same prompt works in Bolt, v0, Replit and other AI app builders.
Paste this prompt
Replace YOUR_SITE_ID with your site ID, then paste it into the Lovable chat:
Add Varde analytics to the whole app. Put this script tag in the <head> of index.html (not inside a React component) and keep the defer attribute exactly as written:
<script defer data-site="YOUR_SITE_ID" src="https://vardeanalytics.com/js/script.js"></script>
Do not add any cookie banner or other analytics for this.Lovable apps change pages without reloading. Varde notices these changes and counts each page, so nothing else is needed.
Use the right domain
Varde only counts visits on the domain you registered and its subdomains. If your app runs on a custom domain, add that domain. If it runs on yourapp.lovable.app, add that full address as the site's domain. Visits to the Lovable editor preview are not counted.
Track goals
Ask Lovable to send a goal when something happens, for example:
When a user completes signup, call this (it is safe if the script has not loaded yet):
window.varde?.('signup');
Add a TypeScript declaration so window.varde is typed as optional: (name: string, opts?: { props?: Record<string, string | number | boolean> }) => void.Then add a goal named signup in your dashboard. See Goals and events.
Check that it works
Open your site in a normal browser window. The add-site screen shows Connected once the first pageview arrives, and the dashboard fills in within a few minutes. If nothing shows up, see the checklist at the bottom of Install on your platform.