Skip to content

Tracking & attribution engineeringClient work

Webflow or SPA Form Leads Not Counted: Lead Tracking Including Cross-Origin Iframe Signals

Lead tracking for Webflow and SPA sites: a layered listener that survives page transitions and measures a booking widget inside a cross-origin iframe.

For
B2B services and studios
Checked

The situation

  • The form arrives in your inbox. The conversion never shows in GA4 or Google Ads.
  • The site is a single-page app — Webflow with in-page transitions — so a listener written for a full page load stops seeing the form.
  • The Google tag is still listening for an event from a site build that no longer exists.
  • Google Ads bids on form_submit, which fires on the attempt, including submissions that were rejected.
  • The booking tool runs in a cross-origin iframe, where the browser will not let the documented redirect fire, so the booking is measured as nothing.

What I build

I build lead tracking that survives how the site actually works: a layered, deduplicated listener whose primary signal is the endpoint answering success, with a structural DOM fallback, a once-per-page guard and no personal data in the data layer. It survives in-page navigation, it survives the old container, and where the booking widget sits in a sandboxed cross-origin iframe I measure it with a postMessage bridge instead of a redirect that can never fire.

How it works

  1. Recon the site and the legacy container. What fires today, from which owner, for which form or booking — often without CMS access.
  2. Build a layered detector. Network success first, structural DOM fallback, once-per-page guard, no PII in the data layer.
  3. Make the event count for Ads. generate_lead becomes the GA4 key event; Ads imports it and restructures — generate_lead primary, form_submit secondary.
  4. Bridge the iframe. A postMessage bridge carries the booking confirmation out of the cross-origin widget when redirect detection is impossible.
  5. Stop the noise. Ads tags are blocked on 404 pages by the page’s own structural id, and internal traffic is filtered.
  6. Prove it. Fifteen negative tests, five written acceptance conditions, and a change record where every change has its own one-step undo.

What you get

  • A lead counted on confirmed success, once — not on the attempt.
  • Bookings measured from inside the iframe, on real confirmation.
  • No Ads tag on 404 pages and no internal traffic in your numbers.
  • Paste-ready instructions if I never get CMS access — the only site-side change is the container snippet.
  • A change record: 27 changes in the dated case, each with its own reversal path.

Built with: Webflow and Barba.js (SPA transitions), GTM driven through API scripts, GA4 Admin API, Google Ads, CookieYes consent mode, Cloudflare, a cross-origin booking embed (postMessage), a Python monitor

Done before, with dates and numbers

Google Ads was optimising on form_submit, the attempt, including failed submissions; it now optimises on generate_lead, a confirmed enquiry. In the 90 days before the work, 321 sessions reached the booking page and 5 reached confirmation — coming from an unmeasured booking widget. The fix closed with 5 of 5 written acceptance conditions met and 15 of 15 negative tests passed on 2026-08-21.

  • Hong Kong design studio, Webflow SPA · delivered Aug 2026. 27 changes each with its own one-step undo; 5 of 5 written acceptance conditions met; 15 of 15 negative tests passed; booking measured from zero across a sandboxed cross-origin iframe with a postMessage bridge — with no CMS access. Read the case: 27 Changes, Each With Its Own Undo: Fixing Lead Tracking on a Site I Never Logged Into
  • Cross-domain, subdomain, iframe and user-ID tracking · 23 contracts since 2017. keeping attribution intact when a funnel spans domains and iframes.

Rated 5 out of 5 on Upwork.

I hired [him] for the project on Friday and wasn't expecting him to start before Monday as the project was not urgent. However he did everything over the weekend!

Linas L., LISA Group Upwork · 2016

What you can look at

A redrawn listener diagram — network-response primary with a DOM fallback and a once-per-page guard — plus a redacted excerpt of a success network response and the iframe postMessage bridge, rebuilt on synthetic data.

Client details anonymised. Figures read from live platform APIs in August 2026. Technical implementation, not legal advice.

What it costs and how it runs

A bounded lead-tracking repair is a Focused Fix, from USD 450, with the scope and a fixed price agreed in writing before any work starts. If it is not yet clear what broke, the first step is a read-only Tracking Health Check (USD 395) with a written verdict, or a Working Session (USD 195) on one question. Discussing the task is free.

Price
Focused Fix from USD 450 for a bounded lead-tracking repair. If the cause is unclear, start with a read-only Tracking Health Check (USD 395) or a one-question Working Session (USD 195).
Timeline
A bounded fix with a fixed quote before it starts. In the dated case the work closed on 2026-08-21 with all five written acceptance conditions met.

When you don’t need this

If your form already fires one clean lead on confirmed success, your booking tool is same-origin, and Ads already learns from the right event, you don’t need this — I’ll say so. And if the real problem is that the form is not converting at all rather than not being measured, that is a different job; a read-only check will tell you which one you have.

What people ask about this

I don't have CMS access. Can you still fix it?

Yes. The only site-side change is the container snippet, delivered as paste-ready instructions you publish yourself. The container, Analytics and Ads changes are done through their APIs.

Will this break my Webflow page transitions?

No. The listener is built to survive in-page navigation, which is exactly the failure the old container had.

Why is my booking page not measured?

Because the booking widget runs in a cross-origin iframe where the documented redirect cannot fire. A `postMessage` bridge measures the real confirmation instead.

Do rejected submissions still count?

No. The lead fires on the endpoint answering success, not on the attempt.

How many changes will you make?

As few as possible, each with its own reversal path, recorded in a written change record. In the dated case there were 27.

More like this

All situations

Daniil Maximkin

Hi, I’m Daniil.

I work with you from defining the problem to implementation and handover. You talk to the person who does the work. I work in English and Russian; written correspondence in Spanish with translation support.

Have a task like this?

Describe your task

The first answer is free, within one working day. Or write directly: next@taskfordaniel.com