Documentation

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

  1. Open your Repl in the Replit editor
  2. Open index.html in the file tree
  3. Add the following script inside the <head> tag:
<script
  src="https://app.loamly.ai/t.js?d=yourdomain.com"
  defer
></script>
  1. Replace yourdomain.com with your actual domain (or your .repl.co URL)

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

Loamly works with any Replit web project. As long as your app serves HTML to a browser, just add the script to the <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

  1. Click the Run button to start your Repl
  2. Open the Replit webview or the external URL in a new tab
  3. Open your Loamly dashboard
  4. Check the real-time visitors section
  5. Your visit should appear within seconds

Troubleshooting

IssueSolution
Not seeing visitsMake sure your Repl is running and you are viewing the live webview, not just the code editor
Domain mismatchEnsure the domain in your script matches your Replit URL or custom domain exactly (no www vs non-www mismatch)
Ad blockerTry disabling ad blockers temporarily to verify
Repl is asleepFree Repls go to sleep after inactivity. Make sure your Repl is awake and serving the page before testing

Debug mode

Open the browser console on your live site and run 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.