Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Embedded HubSpot or Typeform iframe not loading: how to fix it

PRF-103High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Many sites do not build their own lead form. They embed one from a tool such as HubSpot or Typeform. The embed is either an <iframe> (a page inside your page) or a script that creates an iframe after the page loads.

This issue is when that iframe never appears or stays empty. The rest of the page looks normal, so nobody on your team notices. The visitor sees a gap, a spinner or a grey box where the form should be.

Why it costs you leads or sales

The form is usually the goal of the page. If it does not load, the visitor cannot convert, and the ad click or search visit you paid for is wasted. Because the page still returns a normal status, uptime tools stay green and you may only notice when lead numbers drop.

Leads per day before and after the embed breaksExample numbers
Leads per day before and after the embed breaks (example)Embed working: 12 leads/day; Embed broken: 0 leads/day059120Embed workingEmbed brokenleads/day

Example: a landing page that normally gets 12 leads a day drops to 0 when the embedded form stops loading, while ad spend carries on.

Where the funnel breaks
  1. Ad or search clickVisitor lands on the page
  2. Page loadsHeadline and copy show
  3. Form iframeBlank box, blocked or erroring
  4. Form submitNot possible
  5. Lead in CRMNever created

The page loads, but the form iframe does not, so every later step is lost.

How to check if your site has it

Check the embed in your browser
  1. Open the page in a private window

    Use a fresh window with no extensions. Wait for the page to finish loading and scroll to the form. Then test again in a normal window with your ad blocker on.

  2. Open the console

    Press F12 (or Cmd+Option+I on Mac), open the Console tab and reload. Look for messages such as 'Refused to frame', 'Refused to load the script', 'blocked by CSP' or 'ERR_BLOCKED_BY_CLIENT'.

  3. Check the Network tab

    Filter by 'hsforms', 'hubspot', 'typeform' or 'iframe'. A red request, a 403, a 404 or no request at all points to the cause.

  4. Inspect the page source

    Search for the embed code. Check that the portal ID, form ID or Typeform form ID matches the live form and that the form is not unpublished or deleted.

  5. Test with and without consent

    Clear cookies, reload and test before accepting the cookie banner, then after accepting. Some setups hold the form back until consent is given.

Common console messages and what they usually mean
What you seeLikely causeWhere to fix
Refused to frame ... frame-srcYour site's Content Security Policy does not allow the form domainCSP header or meta tag
Refused to display ... X-Frame-OptionsYou embedded a page that does not allow framing, such as a share link instead of the embed codeUse the official embed code
ERR_BLOCKED_BY_CLIENTAd blocker or privacy extensionTest without it; consider fallback link
404 on the form requestWrong or deleted portal or form IDEmbed code and form settings
No request at allScript delayed, deferred or blocked by a consent toolTheme, optimizer or consent settings

How to fix it

Fix the cause you found in the console. The most common one on sites with security headers is a Content Security Policy that does not list the form provider.

Example CSP additions for HubSpot and Typeform embedstext
script-src 'self' https://js.hsforms.net https://js.hs-scripts.com https://embed.typeform.com;
frame-src 'self' https://forms.hsforms.com https://share.hsforms.com https://*.typeform.com;
connect-src 'self' https://api.hsforms.com https://forms.hsforms.com;
Fix by platform
  1. Re-copy the embed code

    In HubSpot, open the form and choose Share > Embed code. In Typeform, choose Share > Embed. Paste it into a Custom HTML block, not a visual block that strips scripts.

  2. Exclude the script from optimization

    If you use a caching or speed plugin with delay JavaScript or defer options, add js.hsforms.net or embed.typeform.com to its exclusion list, then clear the cache.

  3. Check security plugins

    If a security plugin or host adds a CSP header, add the form domains to it.

HubSpot embed with a fallback linkhtml
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
  hbspt.forms.create({
    region: "na1",
    portalId: "YOUR_PORTAL_ID",
    formId: "YOUR_FORM_ID"
  });
</script>
<noscript><a href="https://YOUR-FORM-LINK">Open the form in a new tab</a></noscript>

How to confirm it's fixed

Confirmation checklist
  • The form appears in a private window with no extensions
  • The console shows no 'Refused to frame' or CSP errors
  • The form shows both before and after you accept cookies
  • It works on mobile and on desktop
  • A test submission reaches your inbox and CRM
  • The live URL was tested, not just a preview

How to prevent it happening again

Prevention
  • Re-test the form after every theme, plugin, consent tool or security header change
  • Keep a note of the form domains your CSP must allow
  • Do not delete or unpublish forms that are still embedded
  • Add a fallback contact line under each embed
  • Monitor the page on a schedule instead of relying on lead counts
How it often unfolds
  1. Day 1

    A security update adds a Content Security Policy without the form domain.

  2. Day 1

    The form iframe is blocked and the page shows a blank gap.

  3. Days 2-6

    Ads keep sending traffic, but no leads arrive.

  4. Day 7

    Someone spots the drop, finds the console error and adds the domain.

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor opens your page on a schedule and tries to reach the form inside the embedded frame. If the frame selector step fails, meaning the iframe is not found or never loads, the check fails.

A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause. You can get it by email, Slack, Teams, WhatsApp, webhook or PagerDuty. The Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial. FunnelGuard does not bypass CAPTCHAs or bot protection, so a form behind one may need a different setup.

The embed fails and nobody notices

The page loads, the iframe does not, and the visitor leaves.

Questions people ask

Why is my HubSpot form not showing on my website?

The most common causes are a Content Security Policy that blocks js.hsforms.net or the form frame, a speed plugin delaying the script, a consent tool holding it back, or a wrong portal or form ID. Open the browser console and look for a blocked request or 404 to find which one applies.

Why does my Typeform embed say 'refused to connect'?

This usually means the URL you embedded does not allow framing, or your site's CSP does not allow the Typeform domain in frame-src. Use the embed code from Typeform's Share panel rather than a plain link, and add the Typeform host to your policy if you use one.

How do I fix a blank space where my embedded form should be?

Check the console for blocked scripts, confirm the form ID is correct and published, and exclude the form script from delay or defer settings in any optimization plugin. Then test the live page in a private window.

Can a cookie banner stop an embedded form from loading?

Yes. If your consent tool classes the form script as marketing or non-essential, it may block it until the visitor accepts. Test the page before and after consent, and allow the script or load it in a way your consent setup permits.

Do ad blockers block HubSpot and Typeform embeds?

Some privacy extensions and ad blockers block requests to tracking-related domains, which can affect form embeds. You cannot control visitors' extensions, so add a visible fallback such as an email address or direct link.

How do I know if my embedded form is broken before customers tell me?

Check lead counts daily, or use synthetic monitoring. FunnelGuard runs a robot visit on a schedule, looks for the form in its frame, and alerts you with a screenshot and likely cause if that step fails.

Will a normal uptime monitor catch a broken form embed?

Usually not. The page itself returns a normal response, so a simple uptime check stays green. You need a check that loads the page in a browser and tests the form.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: frame selector step fails.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.