Posted on

How to Set Up WordPress Contact Form Conversion Tracking

How to Set Up WordPress Contact Form Conversion Tracking

Learn how to track every form submission from your WordPress site and measure the real value of your traffic sources.

Why You Need WordPress Contact Form Conversion Tracking

Without proper wordpress contact form conversion tracking, you operate blind. You see traffic numbers in Google Analytics but you cannot connect those visitors to actual business outcomes. When someone fills out your contact form, that represents a potential customer. You need to know which traffic source sent them.

Conversion tracking tells you which Google Ads campaigns generate leads, not just clicks. It shows you which blog posts convert readers into prospects. It reveals which landing pages work and which waste your budget. This data changes how you allocate resources.

Most WordPress sites collect form submissions but never close the loop with their analytics platforms. They pay for advertising without knowing if it works. They create content without measuring its contribution to business goals. We will fix that problem today.

Choose Your WordPress Contact Form Conversion Tracking Method

You have three main approaches to track form submissions on WordPress. Each has different complexity levels and capabilities.

Method Complexity Flexibility Best For
Plugin Built-in Tracking Low Limited Simple setups, single platform
Google Tag Manager Medium High Multiple platforms, full control
Custom Code High Highest Complex requirements, developers

We recommend Google Tag Manager for most situations. It gives you complete control without touching WordPress code. You can send conversion data to Google Ads, Google Analytics, Facebook Pixel, and any other platform from one central location.

Important: Built-in plugin tracking often sends data only to Google Analytics. If you run paid advertising on multiple platforms, you need a more flexible solution.

The GTM method also makes troubleshooting easier. You can preview changes before publishing. You can see exactly what fires and when. You maintain a version history of all tracking modifications.

Set Up Google Tag Manager for Form Tracking

Before you can track wordpress form submissions, you need Google Tag Manager installed on your site. This container system manages all your tracking codes from one interface.

1

Create Your GTM Container

Visit the Google Tag Manager website and create a free account. Set up a new container for your website. Choose “Web” as the container type. Google provides two code snippets after creation.

2

Install GTM on WordPress

You can add the GTM code manually to your theme or use a plugin. We recommend the official Google Tag Manager for WordPress plugin. Install it, enter your container ID (format: GTM-XXXXXX), and activate. The plugin handles code placement automatically.

3

Verify Installation

Open Google Tag Manager and click “Preview” in the top right. Enter your website URL. A new tab opens showing Tag Assistant. You should see your container connected. If not, check that the plugin is active and the container ID is correct.

Once GTM is installed, you control all tracking from the Tag Manager interface. You no longer need to edit WordPress files or update plugins to modify tracking behaviour. This separation makes your site more maintainable and secure.

Pro Tip: Create a separate GTM workspace for conversion tracking. This keeps your form tracking changes isolated from other modifications and makes testing cleaner.

If you prefer professional installation, our GTM setup service includes container creation, WordPress integration, and baseline tracking configuration.

Track Contact Form 7 Conversions with WordPress

Contact Form 7 is the most popular WordPress form plugin. Contact form 7 conversion tracking requires capturing the form submission event and sending it to your analytics platforms.

Contact Form 7 fires a DOM event called wpcf7mailsent whenever someone successfully submits a form. We will listen for this event and trigger our tracking tags.

1

Create the Custom Event Trigger

In Google Tag Manager, go to Triggers and click New. Name it “CF7 Form Submit”. Choose trigger type “Custom Event”. For the event name, enter exactly: wpcf7mailsent

2

Set Up the Data Layer Variable

Create a new User-Defined Variable. Choose type “Data Layer Variable”. Name it “CF7 Form ID”. Set the variable name to: contactFormId

This captures which specific form was submitted when you have multiple forms on your site.

3

Create Your Tracking Tag

Add a new Tag. Choose “Google Analytics: GA4 Event” as the tag type. Set the Measurement ID to your GA4 property. Enter “form_submission” as the event name. Add event parameters: form_id with value {{CF7 Form ID}} and form_type with value “contact_form_7”.

4

Attach the Trigger

In your new tag, scroll to Triggering. Select the “CF7 Form Submit” trigger you created. Save the tag.

Contact Form 7 includes the form ID in the event data automatically. You can use this to track different forms separately. If your contact page form converts better than your sidebar form, you will know.

Note: This method tracks successful submissions only. If someone fills out the form but server validation fails, no event fires. This is correct behaviour because you only want to count actual conversions.

Track WPForms Submissions to Google Ads

WPForms is the second most popular WordPress form solution. The wpforms google ads tracking process differs slightly from Contact Form 7 but follows the same principles.

WPForms fires a jQuery event called wpformsAjaxSubmitSuccess when someone successfully submits a form through AJAX. We capture this event and push data to the Tag Manager data layer.

1

Add the Data Layer Push Code

WPForms requires a small code snippet to push submission data to the data layer. Add this to your theme functions.php file or use a code snippets plugin:

add_action('wp_footer', function() { echo "<script> jQuery(document).on('wpformsAjaxSubmitSuccess', function(event, data) { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'wpforms_submission', 'formId': data.formId, 'formTitle': data.form.find('input[name=wpforms_title]').val() }); }); </script>"; });
2

Create the GTM Trigger

In Google Tag Manager, create a new trigger. Choose “Custom Event” type. Name it “WPForms Submit”. Set the event name to: wpforms_submission

3

Set Up Form ID Variable

Create a Data Layer Variable named “WPForms ID” with the data layer variable name: formId

4

Build Your Tracking Tags

Create GA4 and Google Ads conversion tags as needed. Attach the “WPForms Submit” trigger. Include the form ID as a parameter so you can segment conversions by form.

WPForms also offers built-in integrations for some platforms, but the GTM method gives you more control. You can send the same conversion to multiple destinations without relying on plugin updates or premium features.

Pro Tip: WPForms premium includes conditional logic and multi-page forms. Use the form ID variable to track completion rates for complex forms versus simple contact forms.

Send WordPress Contact Form Events to Google Analytics 4

Google Analytics 4 uses an event-based model. Every form submission should appear as a distinct event that you can analyse in your reports. This data shows you which pages and traffic sources generate the most conversions.

The GA4 configuration tag must load before your form submission tags fire. Tag Manager handles this automatically through built-in sequencing, but you need to set up the foundation correctly.

1

Install the GA4 Configuration Tag

If you have not already, create a GA4 Configuration tag. Choose “Google Analytics: GA4 Configuration” as the tag type. Enter your Measurement ID (format: G-XXXXXXXXXX). Set the trigger to “All Pages”. This tag loads the GA4 library on every page.

2

Create the Event Tag

Add a new tag with type “Google Analytics: GA4 Event”. Name it “GA4 Contact Form Submit”. For Configuration Tag, select your GA4 Configuration tag from the dropdown. This links the two tags together.

3

Name Your Event

In the Event Name field, enter “generate_lead”. This is a recommended event name in GA4 that appears in standard reports automatically. You can use a custom name, but recommended events get better reporting integration.

4

Add Event Parameters

Click “Add Parameter” to include additional data. Add a parameter called “form_name” with the value of your form ID variable. Add “form_destination” with value {{Page Path}}. These parameters let you segment conversions in GA4 reports.

5

Attach Your Form Trigger

Set the triggering condition to your form submission trigger. Save the tag. Now whenever someone submits your contact form, GA4 receives a generate_lead event with context about which form and page generated it.

GA4 reports update within 24 hours. You will find your events in the Realtime report immediately and in standard reports the next day. The Conversions report shows total form submissions. The Landing Page report shows which pages generate conversions.

Note: Mark “generate_lead” as a conversion in your GA4 property settings. Navigate to Admin then Events, find “generate_lead” in the list, and toggle “Mark as conversion” on.

Test and Verify Your WordPress Contact Form Conversion Tracking

Configuration means nothing without verification. You must test every tracking tag before you trust the data. Many tracking implementations appear to work but send incomplete or incorrect data.

Google Tag Manager Preview Mode shows you exactly what fires when you submit a form. This is your primary testing tool. You can see every tag that activates, every variable value, and every data layer event.

1

Enter Preview Mode

In Google Tag Manager, click “Preview” in the top right corner. Enter your website URL and click Connect. A new window opens with your site and Tag Assistant Connected message appears. You are now in debugging mode.

2

Navigate to Your Form

Go to a page with your contact form. In the Tag Assistant panel, you see all tags that fired on page load. Look for your GA4 Configuration tag. It should show “Tags Fired” status.

3

Submit the Form

Fill out your contact form with test data. Submit it. In Tag Assistant, a new event appears (wpcf7mailsent or wpforms_submission depending on your plugin). Click this event.

4

Verify Tag Firing

Under the event, you see which tags fired. Your GA4 Event tag and Google Ads Conversion tag should both appear under “Tags Fired”. If they appear under “Tags Not Fired”, click them to see why. Common issues include trigger mismatches or missing variables.

5

Check Variable Values

Click each fired tag to expand its details. Look at the “Variables” section. Your form ID variable should show a real value, not undefined. Page path should show the correct URL. If any variable shows undefined, your data layer push code may have issues.

6

Confirm in GA4 Realtime

Open Google Analytics 4 in another tab. Go to Reports then Realtime. You should see your event appear within seconds. If it does not, check that you selected the correct Configuration Tag in your Event tag settings.

7

Verify Google Ads Conversion

In Google Ads, go to Tools then Conversions. Click your conversion action. Wait 6-12 hours then check for a test conversion. Google Ads data has more delay than GA4. You will not see immediate confirmation.

Test multiple times from different pages if you have forms on various locations. Test from mobile devices. Different browsers can behave differently, though modern form plugins handle this well.

Important: After successful testing, click “Submit” in Tag Manager to publish your changes. Changes in Preview Mode do not affect live users until you publish the container version.

Schedule a retest one week after launch. Check that conversions appear in your reports with reasonable frequency. If you previously received 10 contact form submissions weekly but now show zero conversions, your tracking stopped working.

Common WordPress Contact Form Conversion Tracking Issues

Even correct implementations can develop problems. WordPress updates, plugin changes, and theme modifications can break tracking. Recognise these common issues and fix them quickly to avoid data gaps.

Problem
Tags fire on page load but not on form submit
Cause
Form event name does not match trigger configuration
Fix
Check event name spelling in trigger settings matches plugin event exactly
Problem
Form ID variable shows undefined in preview
Cause
Data layer push code missing or variable name mismatch
Fix
Verify data layer variable name matches code push exactly
Problem
Events appear in GA4 but not Google Ads
Cause
Google Ads tag not attached to form trigger
Fix
Check Google Ads Conversion tag trigger settings and republish
Problem
Tracking worked then stopped after plugin update
Cause
Form plugin changed event structure or names
Fix
Retest in preview mode and update triggers to match new event structure
Problem
Multiple conversion events fire for single submission
Cause
Duplicate tags or triggers for same event
Fix
Audit all tags and remove duplicates or consolidate triggers
Problem
Form submissions work but Tag Assistant shows nothing
Cause
GTM preview mode not properly connected to browser tab
Fix
Exit preview mode completely and reconnect with fresh browser tab
Problem
Conversions track on desktop but not mobile
Cause
Mobile theme or AMP pages use different form implementation
Fix
Test preview mode on mobile device and adjust triggers for mobile events
Problem
GA4 shows events but no conversion count increases
Cause
Event not marked as conversion in GA4 property settings
Fix
Go to Admin then Events and toggle conversion marking on for your event
Need Expert Help?

Get Professional Setup from Rahman Digital Agency

Available for UK and global clients. Full setup completed in under 24 hours by Md Mahmudur Rahman Ashik.

About the Author
Md Mahmudur Rahman Ashik
Google Ads Manager · 5+ Years · Founder, Rahman Digital Agency

Specialising in Google Ads management, conversion tracking via GTM and GA4, and SEO content writing for UK and global clients.