Tracking Webflow Form Submissions in GTM & GA4

Webflow forms have issues with GTM's form_submit trigger. Here's how to track form submissions accurately in GTM, GA4 and other platforms.

  • Webflow forms submit via AJAX with no page reload, so GTM's Form Submission trigger and GA4's automatic form detection miss, miscount, or double-count submissions.
  • The fix is to track Webflow's hidden .w-form-done success message instead: one GTM listener pushes one dataLayer event that every platform fires from.
  • Turn off GA4 Enhanced measurement 'Form interactions' (Admin > Data streams > gear icon) to stop automatic form_submit events from stacking on top of your own tracking.
  • Add a GTM Custom HTML tag on DOM Ready (all pages) with a MutationObserver that pushes a 'webflow_form_submit' event only when the success message becomes visible, so validation errors and failed submissions are never counted.
  • A sessionStorage check counts each form once per browser session; remove it if you want repeat submissions counted.
  • In GTM, create form_id and form_name Data Layer Variables and a Custom Event trigger on 'webflow_form_submit'; send a GA4 'generate_lead' event and mark it as a key event.
  • Google Ads, Meta, LinkedIn, and other platforms can use the same trigger, so every platform gets an identical count.
  • Test in GTM Preview and GA4 DebugView: an invalid submit should fire nothing, a valid one should fire exactly once, with no automatic form_submit alongside it.
  • This only works for native Webflow forms; embedded forms (e.g., HubSpot) or forms with custom action URLs don't use the Webflow success message and need separate tracking.

Webflow forms submit over AJAX with no page reload, so GTM’s Form Submission trigger and GA4’s automatic form detection miss, miscount or double-count them.

If you want an accurate count of Webflow form submissions, skip the built-in form triggers. I track the success message instead: one listener in GTM, one dataLayer event, and every platform fires from that same event.

Why Webflow Forms Break Tracking

Every Webflow form block has three parts inside a .w-form wrapper: the <form>, a hidden .w-form-done success message and a hidden .w-form-fail error message. When someone submits, Webflow cancels the normal browser submit, sends the data in the background, then hides the form and shows the success message. The URL never changes.

Problem Cause
Submissions missing in GA4 There’s no page reload and no thank you page, so there’s nothing for a page view based conversion to count.
GTM Form Submission trigger never fires With Check Validation on, GTM only fires when the browser’s default submit goes through. Webflow always cancels it.
Tracking fires multiple times With Check Validation off, or with a click trigger on the button, the tag fires on every attempt, including ones that fail validation or get rejected.
GA4 automatic detection miscounts Enhanced measurement listens for standard form submits on every form on the page. It misses some AJAX submits and counts search boxes and other forms that aren’t leads.

More often than not I see sites with two or three of these stacked together: GA4’s automatic form_submit, a GTM click trigger, and an Element Visibility trigger set to fire every time the message appears on screen. One lead gets counted two or three times.

Turn Off GA4 Form Interactions

  1. In GA4 go to Admin > Data streams and open your web stream.
  2. Under Enhanced measurement, click the gear icon.
  3. Turn Form interactions off and save.

Add a Success Listener in GTM

Create a Custom HTML tag that fires on DOM Ready for all pages. It watches for a Webflow success message to become visible, which only happens after Webflow accepts the submission. Validation errors and failed submissions never show it, so they’re never counted.

<script>
(function () {
  if (!window.MutationObserver) return;
  window.dataLayer = window.dataLayer || [];

  var observer = new MutationObserver(function (mutations) {
    mutations.forEach(function (mutation) {
      var done = mutation.target;
      if (!done.classList || !done.classList.contains('w-form-done')) return;
      if (window.getComputedStyle(done).display === 'none') return;

      var wrapper = done.closest('.w-form');
      var form = wrapper ? wrapper.querySelector('form') : null;
      var name = form ? form.getAttribute('data-name') || form.id : '';
      var key = 'wf_form_' + (name || location.pathname);

      // Count each form once per browser session
      try {
        if (sessionStorage.getItem(key)) return;
        sessionStorage.setItem(key, '1');
      } catch (e) {}

      window.dataLayer.push({
        event: 'webflow_form_submit',
        form_id: form ? form.id : '',
        form_name: name
      });
    });
  });

  observer.observe(document.body, {
    subtree: true,
    attributes: true,
    attributeFilter: ['style', 'class']
  });
})();
</script>

The sessionStorage check is what stops repeat events. If you want to count a second submission of the same form in the same session, remove that block.

Create the Trigger & Variables

  1. Add two Data Layer Variables: form_id and form_name.
  2. Add a Custom Event trigger with the event name webflow_form_submit.
  3. To target one form, set the trigger to Some Custom Events and filter on form_name.

Send It to GA4 & Other Platforms

Add a GA4 Event tag on that trigger. I use generate_lead as the event name, with form_id and form_name as parameters. Then mark generate_lead as a key event in GA4 under Admin > Data display > Key events.

Google Ads, Meta, LinkedIn and anything else use the same trigger. Since the event is only pushed once, every platform gets the same count.

Test It

  1. Open GTM Preview and load a page with a form.
  2. Submit with a required field empty. webflow_form_submit should not appear.
  3. Submit a valid entry. The event should appear once, with both variables filled in.
  4. Check DebugView in GA4 for a single generate_lead and no automatic form_submit next to it.

This only covers native Webflow forms. An embedded HubSpot form, or a form with a custom action URL, doesn’t use the Webflow success message, so it needs its own tracking.