InstallPlatforms
Lovable, Bolt, v0 and Replit
Add trckable to a site made with Lovable, Bolt, v0 or Replit, by asking the builder or editing index.html.
These tools generate a normal React app (usually Vite). You can ask the builder to add the script, or add it yourself in index.html.
Steps
- Open your project and find index.html in the project root.
- Or paste the text below into the builder's chat and let it make the change.
- Check the change, then publish or deploy the project.
Add this to index.html inside <head>:
<script
defer
data-site="tkb_a1b2c3d4"
data-domain="example.com"
src="https://stats.example.com/js/tkb_a1b2c3d4.js">
</script>Because the app is React, the npm package works too. Use one or the other, not both.
Check it works
Open your site in a private window, then open your trckable dashboard and look at Live. Your visit shows up within a minute.
If it does not show
- The builder put the tag in the body or a component. Ask it to move it into
<head>ofindex.html. - The preview inside the builder does not count visits. Open the published address.
- The tag was added twice, or the builder changed
data-site. Keep the id exactly as given.
Still stuck? Run npx trckable doctor against your site, or see the script tag page.