How do I add analytics to a Lovable site?

Ask Lovable in the chat to add your analytics script to the site, then publish. With Okidoki you copy one ready sentence from the setup page and paste it into Lovable; it adds the script to index.html and the visit shows up as soon as the site is published. The same works in Bolt, v0, Replit and Base44.

Create a free accountFree for up to three sites. No card needed.

Updated 1 December 2026

Step by step

  1. Create a free Okidoki account and add your site’s address.
  2. Copy the sentence on the setup page. It names the script and where it goes.
  3. Paste it into the Lovable chat and send.
  4. Lovable adds the script to the page head. Click Publish.
  5. Open your published site. Your visit should appear in Okidoki within seconds.

The Lovable install guide has screenshots of each step.

Things to check

  • Publish, not just preview. The preview runs on a Lovable address; count the published site.
  • Page changes. Lovable sites are single-page apps. Okidoki counts each new page when the address changes, without extra code.
  • Custom domain. If you move the site to your own domain, keep the same Okidoki site; it follows the script, not the address.

Ask the numbers from your AI tool

With Okidoki’s MCP server, Claude or ChatGPT can read your statistics too, so you can ask “how did the launch go?” in the same place you build. See can I ask ChatGPT about my website traffic?.

Ask your website. Get answers right away.

Free for 3 sites. No credit card, no cookies, no code to touch.

Or look around a live demo first, no account needed →