Replit
Add Loamly to your Replit site
Replit is an online IDE that supports any web project — HTML, React, Node.js, Python/Flask, and more. This guide walks you through adding Loamly tracking to any Replit web project.
Add the tracking script
Static HTML projects
- Open your Repl in the Replit editor
- Open
index.htmlin the file tree - Add the following script inside the
<head>tag:
<script
src="https://app.loamly.ai/t.js?d=yourdomain.com"
defer
></script>- Replace
yourdomain.comwith your actual domain (or your.repl.coURL)
Node.js / Express projects
For server-rendered projects, add the script to the HTML template served by your server. For example, in an Express app:
<!-- views/index.html or public/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Replit App</title>
<!-- Loamly tracking -->
<script
src="https://app.loamly.ai/t.js?d=yourdomain.com"
defer
></script>
</head>
<body>
<!-- your content -->
</body>
</html>React / Vite projects
If your Repl uses React or Vite, add the script to the index.html at the project root:
<head>
<!-- existing tags -->
<script
src="https://app.loamly.ai/t.js?d=yourdomain.com"
defer
></script>
</head>Works with any web framework
<head> of your HTML template.Enable AI verification (recommended)
The client-side script tracks page views, but to unlock the full power of Loamly you need server-side setup. This enables AI bot crawl detection, RFC 9421 signature verification, bot-to-click temporal matching, and prompt-to-crawl correlation with your Intelligence data. Without it, you miss the connection between AI bots crawling your site and the humans who visit after.
See the AI Visitor Verification guide for setup instructions.
Verify installation
- Click the Run button to start your Repl
- Open the Replit webview or the external URL in a new tab
- Open your Loamly dashboard
- Check the real-time visitors section
- Your visit should appear within seconds
Troubleshooting
| Issue | Solution |
|---|---|
| Not seeing visits | Make sure your Repl is running and you are viewing the live webview, not just the code editor |
| Domain mismatch | Ensure the domain in your script matches your Replit URL or custom domain exactly (no www vs non-www mismatch) |
| Ad blocker | Try disabling ad blockers temporarily to verify |
| Repl is asleep | Free Repls go to sleep after inactivity. Make sure your Repl is awake and serving the page before testing |
Debug mode
Loamly.debug(true) to enable verbose logging. This helps confirm the script is loading and sending data correctly.Need help? Email hello@loamly.ai and we will get you set up.