Skip to main content

Add the script on Lovable and other AI builders

Where to paste the line on Lovable and other AI builders, and how to check it.

About 5 minutesYou need: access to the project
On this page

Steps

  1. Copy your line from Settings, then Script.
  2. Open the project's index.html.
  3. Paste the line before </head>.
  4. Publish. Ask the builder to keep the line when it edits the file.
  5. Press Check my site in the app.
Your line
<script async src="https://YOUR-LINK-DOMAIN/t.js" data-key="mk_YOUR_KEY"></script>

How to know it worked

The check says Found. Then open your page once, and the script status changes after we see the visit.

Good to know

These builders often make single page apps. The script watches page changes, so one line is enough.

If your app has its own signup, call totems.identify after a successful signup. See Your own site.

Common errors

ProblemFix
Not foundPublish the site and clear its cache
Found more than onceRemove the extra line
Links lose the tm codeRemove redirects that drop values after ?
Note:

We wrote these steps from Lovable and other AI builders's public settings. Menus change. We have not tested this guide on a live account.

Was this useful?

Your answer stays in this browser.