Few support tickets are as frustrating as "the form is not working." It works for the person who built it, it works in the editor, and yet leads report that the form never appeared, or appeared and swallowed their submission without a word. The form itself is almost never broken. What breaks is the environment around it: a consent banner that held the script back, a browser that classified it as a tracker, a caching plugin that rewrote it, or a policy header that refused to let it run.
In this guide, I will give you the diagnosis in the order that finds the cause fastest: where the form script comes from and what can stop it, the consent banner mistake that hides forms from a share of your visitors, the browsers that block it on their own, the site-side culprits like caching and content security policy, and the quieter failure where the form submits fine but the lead arrives with no attribution. Each section ends with what to check in the browser's developer tools.
Part of the guide: HubSpot implementation: the guide and checklist
Where the embedded form actually comes from
An embedded HubSpot form is not HTML in your page. It is a small embed snippet that loads a script from HubSpot's domain, js.hsforms.net, and that script builds the form in the browser by calling hbspt.forms.create. If that script never loads, there is no form, and the console shows the error that explains it: hbspt is not defined. If it loads but is denied the resources it needs, the form renders and fails on submit.
That architecture tells you where to look first. Open the developer tools, go to the network panel, reload the page, and filter by hsforms. If the request to js.hsforms.net is missing, blocked or returning an error, nothing downstream matters yet. The form cannot be broken before it exists.
The consent banner that hides the form
The most common cause of a form that works for some visitors and not for others is the cookie consent tool. Because the form script loads from HubSpot's domain, consent tools classify it as a third-party tracker and hold it back until the visitor accepts cookies. The visitors who decline, or who never interact with the banner, never see the form. The form is not broken for them; it was never allowed to load.
The fix is a classification, not a code change. Configure the consent tool to treat the HubSpot forms embed script as necessary or functional, so it loads regardless of consent, and block only the tracking cookie, hubspotutk, under the marketing or analytics category until the visitor consents. That way the form appears for everyone, and attribution is attached only for those who allowed it. If your tool works by domain, allowlist js.hsforms.net and js.hs-scripts.com. The same classification work applies to the rest of your tags when you configure the HubSpot cookie banner with GTM, GA4 and Clarity, so it pays to review the forms script and the full consent setup in the same pass.
Browsers that block it on their own
Some visitors have no consent problem and still see no form, because their browser blocks the script before any banner is involved. Firefox's Enhanced Tracking Protection can block requests to hsforms.net, and the strict tracking prevention mode in Edge has been reported blocking the forms embed script in the same way. The console in those browsers says exactly that: a script resource was blocked by tracking prevention.
You cannot change a visitor's browser settings, so the workarounds are on your side. Load the form through the HubSpot Forms API from your own backend, serving a first-party form that does not depend on the third-party script. Or, with more maintenance cost, serve the form first-party from your own domain. For most sites, the pragmatic path is to accept that a small share of strict-mode visitors will not see the embedded form and to make sure the contact page also offers a plain alternative, like an email address, so no lead is lost to a browser setting.
Caching, minification and the rewritten script
On sites with performance plugins, especially on WordPress, the form breaks in a way that looks random: it works after a deploy, then stops. The cause is a caching or minification plugin that combines, defers or rewrites the HubSpot embed script, so hbspt.forms.create runs before the library exists or runs against a mangled copy. The console again says hbspt is not defined, but this time the network request succeeded, which is the clue that the script was altered after it arrived.
Exclude the HubSpot scripts from the optimization plugin, clear every cache layer, the plugin's, the server's and the CDN's, and test in a private window. If a consent tool is also present, the two interact: a deferred script and a consent-gated script can race each other, and the form loses. Resolve the caching exclusion first, then the consent classification, and test again between the two.
Content Security Policy and the refused script
Sites with a strict Content Security Policy refuse to run scripts from domains the policy does not list, and the HubSpot form is a script from a domain your policy may not know. The console shows a CSP violation naming the blocked source. The fix is to add HubSpot's form and script domains, *.hsforms.net and *.hs-scripts.com, to the directives that govern scripts and frames, and to confirm the policy also allows the form's submission endpoint to be reached.
Treat the CSP change like any security change: add the specific HubSpot domains rather than loosening the whole policy, and test the form end to end after the header is updated, because a policy that allows the script to load but blocks the submission produces a form that renders perfectly and fails silently on send.
A tip from someone who has been burned: before you touch any configuration, open the console and the network panel in a private window, and read what the browser is telling you. "hbspt is not defined" with no network request means the script was blocked before it loaded. The same error with a successful request means something rewrote it afterward. A tracking-prevention message means the browser itself. The browser names the culprit in the first ten seconds, if you look.
The form that submits but the lead arrives naked
There is a quieter failure that no one reports, because the form works: the submission lands in HubSpot, but the contact has no original source, no pages viewed and no campaign. That happens when the tracking cookie, hubspotutk, was blocked or never set, so the submission could not be tied to the visitor's browsing history. The lead exists, and attribution has a hole where it should be.
The cause is usually the consent configuration again, this time working as designed: the visitor declined marketing cookies, so no tracking cookie, so no attribution. That is correct behavior under GDPR and LGPD, and the fix is not to force the cookie. It is to accept that attribution applies only to visitors who consented, to measure the consent rate so marketing knows the size of the blind spot, and to make the consent experience clear enough that visitors who are willing actually accept. Attribution you obtain without consent is not attribution you can keep.
Why this matters for your operation
A form that fails to load for a share of visitors is a leak at the point where demand becomes a lead, and it is invisible in every report, because the visitors who did not see the form never show up as a failed submission. The only trace is a conversion rate lower than it should be and nobody knowing why. Diagnosing the environment around the form, rather than rebuilding the form, is what closes that leak.
The quieter failure matters too. Leads that arrive without attribution undermine every campaign report built on them, and they do it silently, as blanks rather than errors. Getting the consent classification right, so the form loads for everyone and attribution attaches for those who allow it, is what keeps both the lead flow and the reporting honest at the same time.
In practice: the form that only strangers could not see
A company noticed its contact form conversion rate had dropped after a redesign, with no obvious cause. The form worked for everyone on the team. The diagnosis in a private window found the answer in seconds: the new consent banner classified the HubSpot form script as a marketing tracker, so visitors who declined cookies, or never clicked the banner, saw an empty space where the form should be. The team always accepted cookies, so they never saw the problem.
The fix was a reclassification in the consent tool: the forms script became functional and loaded for everyone, while the tracking cookie stayed gated behind marketing consent. The form returned for every visitor, the conversion rate recovered, and attribution still attached only to visitors who consented. No form was rebuilt. The environment around it was corrected.
Checklist for a HubSpot form that will not load or submit
- Does the request to js.hsforms.net appear in the network panel, and does it succeed?
- Is the forms embed script classified as necessary or functional in the consent tool, with only hubspotutk gated behind marketing consent?
- Have you tested in Firefox with Enhanced Tracking Protection and in Edge strict mode to see browser-level blocking?
- Are HubSpot scripts excluded from caching and minification plugins, with all cache layers cleared?
- Does the Content Security Policy allow *.hsforms.net and *.hs-scripts.com for scripts and frames, and the submission endpoint?
- Does the contact page offer a plain fallback, such as an email address, for visitors whose browser blocks the embed?
- Are you measuring the consent rate so the attribution blind spot is a known number?
Frequently asked questions
Why does my HubSpot form not appear for some visitors?
Most often because the cookie consent tool classifies the form script as a third-party tracker and holds it back until cookies are accepted. Classify the embed script as necessary or functional and gate only the tracking cookie behind consent.
What does "hbspt is not defined" mean?
That the HubSpot forms library never loaded or was altered before the embed ran. With no network request, something blocked it, usually consent or tracking protection. With a successful request, a caching or minification plugin rewrote it.
Which browsers block HubSpot forms on their own?
Firefox with Enhanced Tracking Protection and Edge in strict tracking prevention have been reported blocking the embed script. You cannot change visitor settings, so offer a first-party fallback or load the form through the Forms API from your backend.
Which domains do I need to allow for HubSpot forms?
js.hsforms.net and js.hs-scripts.com in your consent tool, and *.hsforms.net plus *.hs-scripts.com in the script and frame directives of your Content Security Policy, along with the submission endpoint.
Why does the form submit but the lead has no source?
Because the hubspotutk tracking cookie was blocked or never set, so the submission could not be linked to browsing history. Usually the visitor declined marketing cookies, which is correct behavior; measure the consent rate rather than forcing the cookie.
Should I rebuild the form to fix this?
Almost never. The form is rarely the problem. Diagnose the environment with the console and network panel first: consent classification, browser protection, caching plugins and CSP account for the vast majority of cases.
Let's talk? Losing leads to a form that fails to load or submit, and want it diagnosed and fixed without rebuilding your site? At Insight Sales we set up forms, consent and tracking so every lead arrives. Talk to our team and find out how we can help.