For many B2B companies, the website form is where marketing hands over to sales. If that handover is unreliable, everything downstream suffers: leads go unanswered, reports undercount, and nobody trusts the numbers.
This guide covers how form submissions from your website reach HubSpot, how to keep the information about where each lead came from, how to route new leads to the right person automatically, and how to test the whole path. It is written for marketing teams working with a developer, on any website platform, not only HubSpot's own CMS.
Three ways to get website form data into HubSpot
Method | How it works | Best for | Main trade-off |
|---|---|---|---|
Embedded HubSpot form | You build the form in HubSpot and paste its embed code into your page | Marketing teams who want to change forms without developers | Loads HubSpot's form script on your page; design is limited to what HubSpot's styling allows |
Your own form, sent through HubSpot's API | Your developers build the form in your site's design and send each submission to HubSpot | Sites where design, speed and full control matter | Needs development, and someone has to maintain it when forms change |
HubSpot's non-HubSpot forms feature | HubSpot's tracking code detects simple HTML forms on your pages and captures their submissions | Quick wins on simple, existing forms | Many kinds of forms aren't supported (see below) |
Embedded HubSpot forms
This is the simplest option. Marketing builds and edits the form in HubSpot, and the website shows it through HubSpot's embed code. Submissions, consent options and follow-up emails are all handled by HubSpot.
Two things to check: the site's domain must be added to HubSpot's tracking settings, otherwise submissions from it will be marked as spam; and deeper styling with HubSpot's developer code requires a Marketing Hub or Content Hub Professional or Enterprise subscription. If the form looks out of place on your site, or the embed slows the page down, consider the next option.
Your own form, sent through the HubSpot Forms API
Your developers build the form as part of the website and submit each entry to HubSpot's form submission endpoint. You keep full control of design, validation, spam protection and speed, and the form can look and behave like the rest of your site.
A few details make the difference between a good and a fragile integration:
Keep a matching form in HubSpot. The API submits to a specific HubSpot form, and HubSpot rejects submissions that include fields the form doesn't have or miss its required fields. The HubSpot form acts as the definition both sides agree on.
Turn off CAPTCHA on that HubSpot form and protect your own form instead. HubSpot doesn't accept API submissions to forms with CAPTCHA turned on.
Send the visitor's HubSpot cookie. The submission can include the
hutkvalue from HubSpot's tracking cookie, along with the page URL and name. This links the new contact to their earlier visits, so HubSpot knows how they first found you.Confirm the endpoint at build time. HubSpot files the submission endpoint under its legacy APIs, but it is still the endpoint HubSpot points to for submissions.
Non-HubSpot forms
With HubSpot's tracking code installed and non-HubSpot forms turned on, HubSpot automatically captures submissions from simple forms already on your site. It is quick, but the list of what isn't supported is long: forms inside iframes, forms with JavaScript bound to the submit event or button click, forms that load after the page, forms on single-page applications, forms that ask for sensitive information such as card numbers, and hidden fields. That last point matters because hidden fields are a common way to pass source data, such as UTM parameters. Treat this option as a stopgap rather than a foundation.
Which one should you choose?
Marketing-led site, standard design, forms change often: embedded HubSpot forms.
Headless or custom-built site, strong design system, speed matters: your own form sent through the API.
Old site with a few simple forms, and a short timeline: non-HubSpot forms, until the site is rebuilt.
Keep the source of every lead
A lead without a source can still be followed up, but it can't tell you which campaigns work. Make sure every submission carries:
HubSpot's own tracking, through the tracking code and the
hutkcookie, which fills HubSpot's Original Traffic Source property.Campaign details, by storing the UTM parameters from the visitor's first page in the browser and sending them in hidden fields, mapped to contact properties in HubSpot.
The page the form was on, so you can tell a pricing-page inquiry from a newsletter sign-up.
Store UTM parameters when the visitor lands, not when they submit. By the time someone fills out a form, they may have moved on from the page they landed on, and the parameters are no longer in the URL.
Map fields and lifecycle stages
Before connecting anything, agree on how a submission becomes a record in HubSpot:
Which properties each field fills, using HubSpot's default properties wherever possible, so reports and integrations understand them.
Which lifecycle stage a new contact gets. A demo request usually means a different stage from a whitepaper download.
Consent options, such as permission to send marketing emails, shown in a way that matches your privacy policy and your legal basis for processing.
What happens to existing contacts. HubSpot matches submissions by email address and updates the existing record, so decide which properties a new submission may overwrite.
HubSpot lead routing: get every lead to the right person
Response speed matters. In a 2011 Harvard Business Review study of 1.25 million sales leads, companies that tried to contact a lead within an hour were nearly seven times as likely to have a meaningful conversation with a decision maker as those that waited even an hour longer.
With a Professional or Enterprise subscription, HubSpot workflows can assign and notify owners as soon as a form is submitted:
Start the workflow on the form submission, or on a property such as "requested a demo".
Branch by the rules your sales team uses, such as country, company size or product interest.
Assign an owner. The Rotate record to owner action spreads leads evenly across a team. It requires a Sales Hub or Service Hub Professional or Enterprise subscription, and an assigned Sales or Service seat for each person in the rotation.
Notify the owner straight away, by email, in-app notification or a task with a due date.
Set a fallback owner for leads that match no rule, so nothing is left unassigned.
On Free and Starter plans, form notification emails and manual assignment are the fallback.
Keep the routing rules simple enough that sales can explain them. If they turn into a spreadsheet of exceptions, the form may need to ask a better question instead.
Protect the form
Spam submissions waste sales time and distort reports. Use the protection that matches your form type: HubSpot's own spam settings and CAPTCHA option for embedded forms, or server-side validation plus a challenge such as Cloudflare Turnstile for your own forms. On makersden.io, the Turnstile script loads without blocking the page, and the check only runs once someone starts filling out the form.
Test that every submission arrives
Forms break quietly. A field gets renamed, a workflow is switched off, a new page uses an old embed. Testing every path takes time, so it is easy to skip, but it is the only way to catch these problems before your sales team does. Testing the complete path, from a submission to where it is recorded, is a standard part of our growth engineering work.