Tracking in an embedded form (iFrame)

If you embed your form into your website using an iFrame and want to track conversions (Google Tag Manager, Facebook Pixel, Etracker, etc.), the process is slightly different from that of a standard website form. Here are the most frequently asked questions.


Where does the tracking script run — on my page or in the iFrame?

Both are possible — and both approaches have different strengths:

  • Tracking on your page (outside the iFrame): tracks the page view of the form page, but does not automatically track the submission of the form (because the submission happens within the iFrame).
  • Tracking within the form (inside the iFrame, via propform): reliably tracks the submission because the code runs directly with the form.

Recommendation: Place tracking scripts directly within the propform form. You can find the fields under Form Settings → Tracking:

  • Google Tag Manager (Container ID)
  • Facebook Pixel (ID)
  • Etracker (Account ID)

Track conversion after successful submission

After a successful submission, the visitor lands on the thank-you page — there, propform pushes a custom event into the dataLayer, which your GTM container can listen for. Example trigger in GTM:

  • Trigger type: Custom Event
  • Event name: onload_thank_you_page

You can then use this to trigger, for example, a Google Ads conversion tag or a Meta Pixel event (fbq('track', 'Lead')).

⚠️ There is also a form_submit event — but it fires as soon as the submit button is clicked, even if the submission fails due to a required field. Therefore, use onload_thank_you_page for conversions. All events at a glance: Tracking chapter.


Cross-Origin: My website tracking does not detect the iFrame submission

This is normal and cannot be avoided — by default, browsers block data read access between frames with different domains.

Workarounds:

  • Embed tracking directly in the form (see above) — the cleanest solution
  • If you want to react to form events from within your website: as soon as Google Tag Manager is enabled for the form, propform additionally sends the form events (form_onload, form_start_input, form_submit, form_abort, form_next_step, form_previous_step) to the parent page via postMessage as a JSON string:
// On the parent page (your website):
window.addEventListener('message', function (e) {
  try {
    var data = JSON.parse(e.data);
    if (data.event === 'form_submit') {
      // e.g. trigger your own tracking
    }
  } catch (err) { /* ignore unrelated messages */ }
});

💡 Note: form_submit fires when the submit button is clicked. The thank-you page event (onload_thank_you_page) only runs inside the iFrame in the dataLayer — so reliable conversion measurement belongs in the form itself (GTM/Pixel in the form settings).


Passing URL parameters from the parent page to the iFrame

If your website URL has its own URL parameters (e.g. ?region=berlin&kampagne=spring2026) and you want to pre-fill these in the embedded form, propform handles this automatically:

  • The parameters from the parent URL are passed to the iFrame
  • In the form, they function like regular URL parameters (e.g. ?address[region]=berlin fills the address region field)

Prerequisites:

  • The relevant fields in the propform form have “Allow pre-filling with URL parameters” enabled
  • The parameter names follow the propform convention (?modul[feld]=wert)

Use case: Landing page with ?region=berlin → embedded enquiry form automatically pre-fills the region field → user does not need to select it again.

> 💡 If the data transfer isn’t working in your setup (older embed code, custom wrapper script): send a quick email to hello@propform.io — we’ll check your iFrame snippet.


Cookie Consent / GDPR

> ⚠️ Important: As soon as you activate tracking, you, as the form operator, are responsible for GDPR compliance. This means: Before setting tracking cookies, the visitor’s consent must be obtained.

Find out more in the Tracking chapter and the Privacy chapter.


Webhooks as an alternative to browser tracking

If you want to respond on the server side to every successful submission (e.g. to count conversions in your CRM statistics), use webhooks instead — this is more reliable than browser tracking because it does not depend on ad blockers or cookie consent.

📖 Read more: Webhooks