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
- Open the file tree in the Bolt.new editor
- Open
index.html - Add the script inside the
<head>tag:
<script
src="https://app.loamly.ai/t.js?d=yourdomain.com"
defer
></script>- Replace
yourdomain.comwith your actual domain
Finding the right file
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
- Preview your app using the Bolt.new built-in preview
- Or deploy your project and visit the live URL
- Open your Loamly dashboard
- Check the real-time visitors section
- Your visit should appear within seconds
Troubleshooting
| Issue | Solution |
|---|---|
| Not seeing visits | Make sure you are viewing the live deployed version or the preview URL, not just the code editor |
| Domain mismatch | Ensure the domain in your script matches your deployed URL exactly (no www vs non-www mismatch) |
| Ad blocker | Try disabling ad blockers temporarily to verify |
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.