VisitorLeadVisitorLead
Frameworks (Advanced)

Astro

Install VisitorLead in an Astro layout's <head>.

In your base layout (e.g. src/layouts/Layout.astro), add the script inside <head>:

---
---
<html lang="en">
  <head>
    <script
      id="visitorleadjs"
      async
      src="https://ingest.visitorlead.tech/vl.js"
      data-code="YOUR_SITE_CODE"
    is:inline></script>
  </head>
  <body>
    <slot />
  </body>
</html>

is:inline keeps Astro from processing the tag — it ships exactly as written.

Verify

Run astro dev (or visit production). VisitorLead → Sessions should record the session.

Official references

On this page