Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

Tracking Embedded Forms and Iframes: Calendly, Typeform and HubSpot Forms

Scheduling widgets and hosted forms are easy to embed and hard to track. This guide explains why iframes hide submissions from your tags, what completion events Calendly, Typeform and HubSpot document, and how to carry UTM data into the embedded form so leads keep their source.

The EndFrame Team5 min read

You embedded a Calendly scheduler, a Typeform or a HubSpot form on a landing page, and the bookings and submissions are arriving. But Google Tag Manager shows nothing, GA4 has no conversions, and Meta still thinks the campaign produced zero leads. The embed works for the visitor and is invisible to your tracking. This guide explains why, and how to track each of the three most common embeds using only what the vendors themselves document.

Why embedded forms are invisible to your tags

Most embeds load the vendor's page inside an iframe, which is a separate document from a separate domain. Browsers deliberately prevent scripts on your page from reading or listening to what happens inside a cross-origin frame. That is a security feature, and it means GTM's click and form triggers cannot see a button pressed inside the embed. The same applies to anything the vendor hosts on its own domain after the submission.

The legitimate way through is window.postMessage, a browser API that lets the embedded page send a message to the page that contains it. Your page listens for message events, checks that the message came from the vendor's origin, and reacts. Some vendors wrap this in a JavaScript library with callbacks so you do not have to handle raw messages. Either way, you can only track what the vendor chooses to send.

What each vendor documents

VendorCompletion signalWhat it contains
CalendlypostMessage event calendly.event_scheduledURIs for the scheduled event and the invitee
TypeformonSubmit callback in the embed libraryThe form ID and the response ID
HubSpot (updated forms editor)Window event hs-form-event:on-submission:successForm ID and instance ID in the event detail

Calendly

Calendly's developer documentation lists the events its embed posts to the parent window: calendly.profile_page_viewed, calendly.event_type_viewed, calendly.date_and_time_selected and calendly.event_scheduled, plus a page height event for the inline widget. The booking is calendly.event_scheduled, and its payload contains API URIs for the event and the invitee rather than personal details. Calendly's sample code checks that the message origin is calendly.com and that the event name starts with calendly before acting on it. Its help centre also notes that plain iframe embeds do not support event tracking via postMessage, so use one of Calendly's own embed options. Date and time selected is a useful micro-conversion for spotting drop-off before the booking.

Typeform

Typeform's embed library exposes callbacks rather than raw messages. Its documentation describes onSubmit as running after a respondent successfully submits the form, and not for failed submissions, and it receives the form ID and response ID. Other callbacks such as onReady, onStarted and onQuestionChanged are available if you want to measure engagement. One detail matters for conversion pages: adding an onEndingButtonClick callback disables the redirect on the ending screen button, so do not add it if you rely on that redirect.

HubSpot

HubSpot documents global form events for forms built in its updated forms editor. These are window events, such as hs-form-event:on-ready, hs-form-event:on-submission:success and hs-form-event:on-submission:failed, and the event detail includes the form ID and an instance ID. HubSpot notes that this applies only to the updated editor; forms built in the legacy editor use a separate set of callbacks, documented in their own article, delivered as messages with the type hsFormCallback and event names such as onFormSubmitted. Check which editor built your form before writing the listener, because the two do not share event names.

Turning the signal into a conversion

  1. 1Add a small listener script to the page that hosts the embed, through GTM as a Custom HTML tag or in your site code.
  2. 2For postMessage vendors, verify the message origin before trusting it, then check the event name.
  3. 3When the completion signal arrives, push a data layer event such as generate_lead with the vendor name and the form or event identifier.
  4. 4Use a GTM Custom Event trigger on that data layer event to fire your GA4, Meta and TikTok conversion tags.
  5. 5Use the vendor's ID, such as Typeform's response ID, as the event ID so the conversion can be deduplicated.
  6. 6Test with a real booking or submission in GTM Preview mode and confirm the event appears once.

If the data layer step is new to you, our guide to what a data layer is explains it. The broader principle, firing on confirmed success rather than on a click, is covered in how to track form submissions reliably.

Two practical details catch people out. First, the listener must already be on the page when the embed loads, so fire the Custom HTML tag on page view rather than on a later trigger, and make sure your consent setup allows it to run. Second, the listener only hears embeds that load inside your page. A plain link that sends the visitor to the vendor's own page in a new tab is outside its reach, so check how the form is actually displayed before assuming the listener is broken. If the same widget appears more than once on a page, use the form ID or instance ID from the event to tell the copies apart.

Keeping the lead's source

Tracking the conversion is half the job. The other half is making sure the lead record in the vendor's system, and then your CRM, says where the lead came from. Because the embed is a separate page, it does not automatically know the UTM parameters on your landing URL.

  • Typeform: define URL parameters such as utm_source and utm_campaign in the form, then pass them through the embed's hidden option or list them in transitiveSearchParams so the embed reads them from your page URL.
  • HubSpot: the forms are tied to HubSpot's own tracking and contact records. Our guide to UTM tracking in HubSpot explains how HubSpot records source and where to add your own campaign properties.
  • Calendly: the browser message gives you the event and invitee URIs, so you can link the booking to the visitor's stored campaign data on your side and look up the booking details through Calendly's API.

In every case, capture the UTMs and click IDs when the visitor first lands and keep them in first-party storage, so they are still available when the embed completes, even if the visitor browsed several pages first. Our guide to capturing UTM parameters in hidden form fields covers that storage step.

When the vendor redirects to its own domain

Some setups send the visitor to a confirmation page hosted by the vendor, or open the form on the vendor's domain instead of embedding it. Your tags never load there. Where the vendor offers a redirect back to a page on your site after completion, that page can fire the conversion, with the duplicate risks any thank-you page carries. Otherwise, rely on the vendor's server-side webhooks to notify your systems.

Where EndFrame fits

EndFrame's tracker stores each visitor's UTMs and click IDs on arrival, so when an embed's completion listener reports a conversion, it can be tied to the original campaign and delivered server-side to Meta, GA4 and TikTok with a shared event ID. The listener itself still depends on the vendor's documented events described above.

Frequently asked questions

Why can't Google Tag Manager see clicks inside an iframe?

An iframe is a separate document, usually from a different domain. Browsers isolate cross-origin frames for security, so scripts on your page cannot read or listen to what happens inside them. The only channel is a message the embedded page chooses to send, which is why vendors that support tracking expose postMessage events or JavaScript callbacks.

Does Calendly send the invitee's email to my page?

Not in the browser message. Calendly's developer documentation shows the calendly.event_scheduled payload containing URIs for the scheduled event and the invitee, not their name or email. If you need those details on your side, you would retrieve them through Calendly's API or receive them through a webhook on your server.

Can I track a Calendly booking if I embed it with a plain iframe tag?

Calendly's help centre states that iframe embeds do not support event tracking via postMessage. Use one of Calendly's own embed options, such as the inline widget, if you need to listen for booking events on your page.

How do I pass UTM parameters into a Typeform embed?

Typeform calls these URL parameters, previously hidden fields. You can set them in the embed code, or list their names in the transitiveSearchParams option so the embed reads them from your page's own URL. Each parameter must also be defined in the typeform itself, or the value is ignored.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading