Resolving Lead Event Tracking Issues in WordPress Forms
Fixing Lead Tracking in WordPress Forms

๐Introduction
A professional services firm using Contact Form 7 on WordPress was not capturing any form submission events in GA4, meaning their entire digital marketing ROI measurement was broken and campaigns could not be optimized for conversions.
โThe Problem
The GA4 form_submit event was configured in GTM to trigger on form submission, but zero events were being recorded in GA4. The campaigns driving traffic to contact pages appeared to have 0% conversion rates, making campaign optimization impossible.
๐Identifying the Causes
Contact Form 7 submits forms via AJAX without a full page reload or URL change, so the standard GTM DOM Ready trigger never fired. The success confirmation element also appeared dynamically after submission, which the standard 'form submit' GTM trigger does not detect. A secondary issue was that the Thank You message div appeared only for users without JavaScript errors.
โ ๏ธConsequences for the Business
Without conversion data, Google Ads campaigns were running on manual bidding at inefficient CPCs. No retargeting audience existed for 'form submitters.' The sales team had no way to correlate form source with lead quality. Monthly spend of $15K on ads had unmeasurable ROI.
โ Solution
Replaced the standard form submit trigger with a GTM trigger listening to the custom Contact Form 7 JavaScript event (wpcf7mailsent). This event fires specifically after successful AJAX form submission and validation. Added a secondary trigger watching for the .wpcf7-response-output element becoming visible as a confirmation layer.
๐Results
Form submission tracking immediately started recording events. GA4 showed 47 lead events in the first week โ matching the CRM entries exactly. Google Ads campaigns were switched to Target CPA bidding with the new conversion data. CPA decreased by 38% within 6 weeks on smart bidding.
๐Conclusion
WordPress Contact Form 7 tracking requires AJAX-aware event triggers. The wpcf7mailsent JavaScript event is the reliable solution that works regardless of page structure changes.
๐กKey Takeaways
Never use standard form submit triggers for AJAX forms. Always verify tracking with GTM Preview mode in real-time while submitting test forms. The wpcf7mailsent event is the standard solution for Contact Form 7; Gravity Forms, WPForms, and Formidable each have their own equivalent events.