Conversion Tracking Fix & Debugging

Resolving Lead Event Tracking Issues in WordPress Forms

Fixing Lead Tracking in WordPress Forms

WordPress lead tracking fix case study

๐Ÿ“Œ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.

Talk to with Us, It's Free

We are always willing to help a client in need and answer any questions or provide guidance. Let us know what you are looking for, and we will develop a unique and bespoke solution for you.

โš ๏ธ reCAPTCHA site key is not configured

BUSINESS HOURS

Not Available

ADDRESS

No Address

TOLL FREE

No Phone