Yes, HeyLead works with Next.js. Add one Script tag to your root layout and every form on your app is tracked with its source, including forms submitted with fetch or server actions. Client-side route changes are recorded as page views automatically, with no extra code.
Setup
Updated
Add the script to your root layout (app/layout.tsx):
import Script from "next/script";
// inside <body>
<Script
src="https://cdn.heylead.io/t.js"
data-site="YOUR_SITE_KEY"
strategy="afterInteractive"
/>Deploy. Forms and route changes are tracked automatically.
Done. New leads arrive with their source in your dashboard.
Watch the setup
This walkthrough connects a WordPress site. On Next.js, only the connect step is different; the steps above show exactly what to do.
How HeyLead worksA common setup: Next.js → Webhooks → HubSpot.
How teams like yours use HeyLead with Next.js.
Yes. Add the same Script tag to pages/_app.tsx. Route changes are tracked in both routers.
Yes. HeyLead records each route change as a page view, so lead journeys include every page visited in your app.
No. One script tag is all it takes, so there's nothing to install or keep updated.
Get started
Connect your website in minutes. From then on, every new lead shows which ad, search, post or AI assistant brought it.