Documentation

Ghost CMS

Add Loamly to your Ghost CMS site

Ghost has built-in code injection that makes adding Loamly quick and easy. You can also add the script directly to your theme if you prefer.

Add the tracking script

The easiest way to add Loamly to Ghost is through the admin panel's code injection feature:

  1. Log in to your Ghost admin panel
  2. Go to SettingsCode injection
  3. In the Site Header field, paste the following:
<script
  src="https://app.loamly.ai/t.js?d=yourdomain.com"
  defer
></script>
  1. Click Save

Replace your domain

Replace yourdomain.com with your actual Ghost site domain.

Alternative: Edit your theme

If you prefer to add the script directly to your theme, you can edit the default.hbs file:

  1. Download your current theme from Settings DesignChange theme Advanced
  2. Open the default.hbs file in a text editor
  3. Find the closing </head> tag
  4. Paste the script just before it:
<script
  src="https://app.loamly.ai/t.js?d=yourdomain.com"
  defer
></script>
</head>
  1. Save the file and re-upload the theme

Theme updates

If you edit the theme directly, your changes may be overwritten when you update the theme. The code injection method is recommended for most users.

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. Visit your Ghost site in a new browser tab
  2. Right-click → View Page Source
  3. Search for "loamly" to confirm the script is in the head
  4. Check your Loamly dashboard for the visit

Troubleshooting

Not seeing visits?

  • Make sure the domain in the script matches your actual site domain
  • Wait at least 2 minutes after installing — data is not instant
  • Confirm the code is placed in the Site Header, not the Site Footer

Ad blockers

Some browser extensions block tracking scripts. Try visiting your site in an incognito window with extensions disabled.

Debug mode

Open your browser's developer console and run:

Loamly.debug(true)

This will log tracking events to the console so you can confirm the script is working.

Need help? Email hello@loamly.ai