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.
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.
- Ad or search clickVisitor lands on the page
- Page loadsHeadline and copy show
- Form iframeBlank box, blocked or erroring
- Form submitNot possible
- 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
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.
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'.
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.
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.
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.
| What you see | Likely cause | Where to fix |
|---|---|---|
| Refused to frame ... frame-src | Your site's Content Security Policy does not allow the form domain | CSP header or meta tag |
| Refused to display ... X-Frame-Options | You embedded a page that does not allow framing, such as a share link instead of the embed code | Use the official embed code |
| ERR_BLOCKED_BY_CLIENT | Ad blocker or privacy extension | Test without it; consider fallback link |
| 404 on the form request | Wrong or deleted portal or form ID | Embed code and form settings |
| No request at all | Script delayed, deferred or blocked by a consent tool | Theme, 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.
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;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.
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.
Check security plugins
If a security plugin or host adds a CSP header, add the form domains to it.
Use a Custom Liquid or Custom HTML section
In the theme editor, add a Custom Liquid section and paste the embed code. Rich text fields remove script tags.
Check apps and customer privacy
If a consent app holds back scripts, mark the form script as allowed in that app or load it after consent is given.
Check the trigger
If you inject the embed through a Custom HTML tag, make sure its trigger fires on the right page, such as Page View or DOM Ready, and not only after a consent event that never happens.
Use Preview mode
In Tag Assistant, confirm the tag fires and that the target element exists before the script runs.
Use an Embed element
Add an Embed element and paste the code. Publish the site, because embeds do not render in the Designer.
Check custom code limits
Make sure the code is not cut off by the character limit and that quotes were not changed when pasting.
Use a Custom JS/HTML element
Paste the embed code into a Custom JS/HTML element on the funnel or website page and save and publish.
Check the page is not framed again
If the page itself is inside another iframe, nested frames can be blocked. Use the page's direct URL.
Use Embed Code
Add an Embed Code element (Embed a Widget or Custom Element) and paste the code in HTML mode. Publish and test on the live URL.
Check cookie consent settings
If the Wix cookie banner or an app blocks the category the form belongs to, adjust it.
Use a Code Block
Add a Code Block, switch off Display Source, and paste the embed code. Code Blocks need a plan that allows them.
Check cookie banner
If scripts are held until consent, set the form to load once the visitor has chosen.
Fix headers
Add the form domains to frame-src and script-src in your Content-Security-Policy. Do not set X-Frame-Options on the form provider's side; that is controlled by them.
Verify IDs
Check the portal ID and form ID in the embed against the provider dashboard.
<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
- 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
- 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
Day 1
A security update adds a Content Security Policy without the form domain.
Day 1
The form iframe is blocked and the page shows a blank gap.
Days 2-6
Ads keep sending traffic, but no leads arrive.
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 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.
Related issues
- PRF-099Third-party script fails to load (chat, form, payment widget)Fix guide
- PRF-109Google reCAPTCHA fails to load, blocking form submitFix guide
- PRF-111Third-party script throws console errorsFix guide
- PRF-100Third-party script slow and blocks renderingFix guide
- PRF-113Ad blockers break core functionality (site depends on blocked script)Fix guide
- PRF-104Booking widget (Calendly/cal.com) shows no availabilityFix guide