Insights  /  Attribution & Measurement
Attribution & Measurement

Your form lives in an iframe. Your pixel can't see it.

Embed a Typeform or Jotform in your landing page and the form runs on the provider's domain. The pixel on your page never sees the submit. It can test fine on its own and break once embedded. Three ways to fix it.

When a form from a tool like Typeform or Jotform is embedded in your landing page as an iframe, it runs on the form provider's domain, not yours. Browsers give a page very limited access to a cross-origin iframe, and MDN documents postMessage as the way the two communicate, so the Google tag, Tag Manager container or Meta pixel on your landing page never sees the submit. There are three fixes: redirect to a thank-you page on your own domain, listen for the form's submit message and push it to your data layer, or use the form provider's own pixel integration and accept its limits.

What it looks like when it breaks

We hit this on a client's landing page. They wanted to test a progressive form without waiting on their dev team, so we built it in Jotform and connected the Meta pixel inside the form. Tested on its own, the form sent events to Meta. Embedded in an Instapage landing page as an iframe, the pixel event stopped arriving. The fix was to have the form send people to a thank-you page and fire the pixel when that page loaded.

Your pixel watches your page. The form lives on someone else's.

Why your tags can't see inside the frame

MDN's documentation of the same-origin policy says that when two documents don't share an origin, references between a page and its iframe give only very limited access, and that cross-origin documents should communicate with window.postMessage. Your Tag Manager container lives on your page. Google's own docs describe the data layer as one object per page that only persists while the visitor stays on that page. A submit event that happens inside the iframe never reaches it unless something passes it across.

Three ways to fix it

Our default is the redirect. It's the least fragile, it keeps the conversion on your domain and in your own Tag Manager container, and it works with any form tool that can redirect.

Whichever you pick, test the real embedded flow, not the form on its own. Use Meta's Test Events tool as described in is your Meta pixel actually firing, and expect some gap between platforms anyway, for the reasons in why your conversion numbers don't match.

The takeaways

  • An embedded third-party form runs on another origin. Tags on your page can't see its submit.
  • A form that tracks fine on its own can stop tracking once embedded. Test the embedded version.
  • Simplest fix: redirect to a noindexed thank-you page on your domain and fire the conversion there.
  • Or catch the provider's submit callback on your page and push it to the data layer.
  • Native form integrations work, but often send custom events and skip the Conversions API.

Common questions

Why doesn't my pixel fire when someone submits an embedded form?

An embedded form from a tool like Typeform or Jotform usually loads in an iframe on the provider's domain. Browsers give a page very limited access to a cross-origin iframe, and MDN documents window.postMessage as the way such documents communicate. The Google tag, Tag Manager container or Meta pixel on your page can't see the submit inside the frame unless the form passes it across.

What is the easiest way to track an iframe form submission?

Redirect people to a thank-you page on your own domain after they submit, and fire the conversion when that page loads. On Typeform, redirect to a URL is available on Plus plans and above and the URL must use HTTPS. Add a noindex tag to the thank-you page so visitors from search don't trigger false conversions.

Can Google Tag Manager track a form inside an iframe?

Not directly from the parent page's container when the iframe is on another domain. The usual fix is to have the form report the submit to your page, for example through Typeform's onSubmit embed callback or a postMessage listener that checks the message origin, then push an event with dataLayer.push and fire your tags on a custom event trigger.

Should I use Typeform's built-in Meta pixel integration?

It works, with limits. Typeform says its integration tracks page views and sends custom events called TypeformFirstInteraction and TypeformSubmit, so you need a custom conversion to optimize to a submission. Typeform also says the integration isn't compatible with Meta's Conversions API. A redirect to your own thank-you page keeps the conversion on your domain instead.

How do I check the fix works?

Test the real embedded flow on the live landing page, not the form on its own. Submit a test entry and confirm the event arrives in Meta's Test Events tool in Events Manager, or in Tag Manager's preview mode for Google tags.

Sourced from the field, checked against the docs. The Jotform and Instapage example is our own client work, anonymized, and the pattern also came up on mentoring calls. Browser behavior is from MDN's Same-origin policy page. Data layer and custom event behavior are from Google's The data layer and Custom event trigger documentation. Typeform details are from its End Screens and redirects and Facebook pixel integration FAQs help articles and its embed callbacks developer docs. No client-identifying data used.

Not sure your landing page form is tracking at all?

Book a strategy call and we'll test your embedded forms end to end, and fix where the conversion fires so your bidding sees every lead.