Documentation

Bolt.new

Add Loamly to your Bolt.new site

Bolt.new is an AI code editor that generates full-stack apps. This guide walks you through adding Loamly tracking to any Bolt.new project.

Add the tracking script

The tracking script goes in the main HTML entry point of your Bolt.new project (typically index.html).

Option 1: Ask Bolt (fastest)

In the Bolt.new chat, type the following prompt:

Add this script to the <head> of index.html:

<script
  src="https://app.loamly.ai/t.js?d=yourdomain.com"
  defer
></script>

Bolt will add the script to your index.html automatically. Make sure to replace yourdomain.com with your actual domain in the prompt before sending.

Option 2: Edit index.html manually

  1. Open the file tree in the Bolt.new editor
  2. Open index.html
  3. Add the 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

Finding the right file

Bolt.new generates different project structures depending on the framework. Look for the main HTML entry point — usually index.html at the project root, or inside a public/ folder.

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. Preview your app using the Bolt.new built-in preview
  2. Or deploy your project and visit the live URL
  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 you are viewing the live deployed version or the preview URL, not just the code editor
Domain mismatchEnsure the domain in your script matches your deployed URL exactly (no www vs non-www mismatch)
Ad blockerTry disabling ad blockers temporarily to verify

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.