Yes, HeyLead works with Astro. Add one script tag with is:inline to the head of your base layout and every form on your site is tracked with its source. It works with static and server output, and with view transitions page changes are recorded too.
Setup
Updated
Open your shared layout (often src/layouts/Layout.astro) and paste this inside <head>:
<script is:inline async
src="https://cdn.heylead.io/t.js"
data-site="YOUR_SITE_KEY"></script>Build and deploy.
Done. New leads arrive with their source in your dashboard.
Watch the setup
This walkthrough connects a WordPress site. On Astro, only the connect step is different; the steps above show exactly what to do.
How HeyLead worksA common setup: Astro → Webhooks → Zapier.
How teams like yours use HeyLead with Astro.
It tells Astro to leave the script tag as it is instead of bundling it, so the data-site attribute reaches the browser.
Yes. Page changes made with view transitions update the browser history, and HeyLead records them as page views.
No. The HeyLead script is about 15 KB, loads in the background and never holds up your pages or forms.
Get started
Connect your website in minutes. From then on, every new lead shows which ad, search, post or AI assistant brought it.