Library·SOP·Analytics
Count a successful Contact Form 7 submission as a Google Ads website conversion using GTM4WP’s success-only data layer event. The method distinguishes success from invalid, spam, and failed attempts on the same page.
Last reviewed: · Editorial review
Clarity, structure and references reviewed in this version. This is not a test in a live account.
Count a successful Contact Form 7 submission as a Google Ads website conversion using GTM4WP’s success-only data layer event. The method distinguishes success from invalid, spam, and failed attempts on the same page.
This SOP covers:
This does not cover:
Contact Form 7 keeps the visitor on the same page after a submission. GTM4WP can pass the form’s distinct success event into Google Tag Manager, so this setup can count success without treating every Submit click as a lead.
Create a short note named Contact form tracking note. Add headings Website and form, Google Ads, WordPress, Google Tag Manager, Preview, Live, and Ads status. Under Website and form, record the page where the form appears, the Contact Form 7 form name, its numeric form ID if shown, and the business-approved value and currency for one completed lead.
Enable GTM4WP’s Contact Form 7 integration and keep submitted field values out of the data layer.
In WordPress, confirm that one Google Tag Manager Web container is already installed on this site and that it is the container you will edit. If another plugin, such as Site Kit, installs it, note its GTM- ID. If two containers load, stop and resolve the duplicate installation first.
In WordPress, open Settings > Google Tag Manager and find the Contact Form 7 settings. If GTM4WP is installed but inactive, activate it first. Turn on the Contact Form 7 integration. In Submitted field values in the data layer, choose None. This keeps names, email addresses, messages, and other entered values out of the data layer; the form ID and form name remain available for the trigger.
If Site Kit or another plugin already installs the container, open GTM4WP’s Google Tag Manager container settings and set Container code placement to Off. Keep the site’s existing single container loader in place. GTM4WP’s Off placement removes its container code while leaving its data layer active. Keep the data layer name at the default dataLayer; do not add another container ID to load.
Use Tag Manager Preview to check the form’s failure and success signals before building its trigger.
In Google Tag Manager, select Preview, enter the form page URL from Contact form tracking note, and select Connect. Return to Tag Assistant and wait for the page event.
In the connected form page, leave a required field empty and submit the form. Return to Tag Assistant and select gtm4wp.contactForm7InvalidInput in the event list on the left. This is the invalid-attempt signal.
Submit one valid sample and wait for the form’s success message. In Tag Assistant, select gtm4wp.contactForm7MailSent, then open its Data Layer tab. Find formid and formname. Record both under Website and form in Contact form tracking note.
If the form does not succeed or gtm4wp.contactForm7MailSent does not appear, send the form page address and any error message to the website maintainer. Ask them to check that the form sends successfully and its GTM4WP integration is enabled. Repeat the test after the fix, then continue when the success event appears. Do not use gtm4wp.contactForm7Submitted instead; it also appears after unsuccessful attempts.
Use the numeric formid when one appears. If it shows (not set), use formname instead. For that fallback, check Contact > Contact Forms in WordPress to make sure no other form has the same name. If another form shares it, ask the maintainer to give this form a unique name and repeat the event check.
Tell Google Ads how this completed lead should be counted. Use a fixed, business-approved lead value; the form does not send purchase revenue.
Create a manual website conversion for the completed Contact Form 7 lead form in Google Ads.
Open Google Ads, go to Goals > Conversions > Summary, and select + Create conversion action. Choose Conversions on a website. Under Edit data sources, enter the website domain and select Scan. Keep the website source selected, then select Done, Save and continue, or the equivalent button shown by the current flow.
Choose Submit lead form. Select + Create conversion or Create conversion, then choose Manually using code or the equivalent manual-code option. This creates the Google Ads action whose tags you will configure in Tag Manager.
Select Done or the button that opens the conversion settings for the selected action.
Set the action's name, bidding role, fixed value, and counting rule before saving it.
Select Edit settings if needed and give the action a clear name, such as Contact Form 7 lead submitted. Set Action optimization to Primary after the business owner confirms that this form is a lead worth optimizing for. This puts completed leads in the account’s main conversion total and lets campaigns use them to adjust bids when they optimize for this goal.
Choose Use the same value for each conversion, then enter the value and currency from the business decision. A fixed lead value is the same amount assigned to every completed form; it is a planning value for reporting and bidding, not the actual revenue from each lead.
Set Count to One. This tells Google Ads to count at most one conversion for this action after one ad interaction, even if the person submits the form more than once from that interaction.
Keep the default attribution setting, select Done, and then select Save and continue.
Get the matching Google Ads identifiers and record the enhanced-conversions choice before moving to Tag Manager.
On the setup summary, select Use Google Tag Manager. If Google shows Set up in Google Tag Manager, open that setup panel so you can read the identifiers, then continue with the manual Tag Manager steps in this guide.
Copy the numeric Conversion ID and the Conversion label into Contact form tracking note under Google Ads. The ID identifies the Google Ads account; the label identifies this particular conversion action. Keep the pair together. When Tag Manager asks for a Google tag ID, use AW- followed by the number. When the conversion tag asks for a Conversion ID, use the number without AW-.
Check whether Google Ads shows Enhanced conversions or User-provided data for this action. Leave it Off or Not configured for this guide and record the visible state in Contact form tracking note. If Google does not show the setting, record Not shown and continue. This separate feature uses customer details and needs its own setup and policy review.
Select Finish or the button that closes the setup summary. Keep Contact form tracking note open for the Tag Manager steps.
GTM4WP sends the form outcome to the data layer. In Google Tag Manager, the custom-event trigger decides when the Google Ads tag sends a completed lead.
Check for existing Google tag coverage before adding anything, then reuse one matching site-wide tag or create one.
Open Google Tag Manager, select the installed Web container, and open Tags. Find Google tags whose Tag ID is AW- followed by the Conversion ID in Contact form tracking note. Write the matching tag's name and trigger under Google Tag Manager in the note.
If one matching enabled Google tag uses Initialization - All Pages, use it. If it uses a different trigger, or more than one matching tag is enabled, ask the container maintainer to leave one matching tag using Initialization - All Pages before continuing. This avoids adding a second tag for the same Google Ads account.
If no matching Google tag is enabled, select New, choose Google tag, enter AW- plus the numeric Conversion ID, set Triggering to Initialization - All Pages, and save it with a clear name such as Google tag — Google Ads. Initialization - All Pages means the base Google tag loads as each page starts, so it can cover the whole website.
Open the chosen Google tag and write its name, ID, and trigger in Contact form tracking note under Google Tag Manager.
Check the container's click-data coverage and keep one valid path for connecting an ad click to a later conversion.
In Tags, find any enabled Conversion Linker tags. A Google tag loads the Ads measurement base; a Conversion Linker stores ad-click information from the landing-page URL so Google Ads can connect that click to a later lead. Google's current guidance says a separate linker is unnecessary when a Google tag loads on every page, so check the existing coverage first.
If an enabled Conversion Linker already fires on All Pages, use it and write Existing linker reused in Contact form tracking note.
If no all-page linker exists, open Workspace > Overview in GTM and find the Container quality card. Select View [number] issues; when the card says Good, select View recommendations. If the list says a Conversion Linker is missing, create one in the next substep. If it does not, and the Google tag uses Initialization - All Pages, write Google tag covers all pages; no separate linker needed in Contact form tracking note.
If the GTM diagnostic says a linker is missing, select New, choose Conversion Linker, use All Pages, and save one clear name such as Conversion Linker — All Pages. Write Linker added in Contact form tracking note.
Create a Google Tag Manager trigger that matches the success event for this one Contact Form 7 form.
If your earlier test showed a numeric formid, open Variables and select New under User-Defined Variables. Choose Data Layer Variable, name it DLV — Contact Form 7 form ID, set Data Layer Variable Name to formid and Data Layer Version to Version 2, then save it. If formid was (not set), skip this substep and use the form-name variable below.
If the form ID was (not set) in your earlier test, create DLV — Contact Form 7 form name as a Data Layer Variable. Set Data Layer Variable Name to formname and Data Layer Version to Version 2, then save it. If you recorded a numeric form ID, skip this substep; the form ID variable is enough.
In Triggers, select New, choose Custom Event, and set Event name to gtm4wp.contactForm7MailSent. Choose Some Custom Events. If Contact form tracking note contains a numeric formid, add DLV — Contact Form 7 form ID equals that number. If the form ID is (not set), add DLV — Contact Form 7 form name equals the exact unique name recorded in the note. Save the trigger with a clear name such as CF7 success — [form name].
gtm4wp.contactForm7Submitted: it also fires for invalid, spam, and failed attempts. If no form ID exists and the name is shared, stop until the intended form is identifiable.Create or reuse one Google Ads Conversion Tracking tag with the matching IDs, approved fixed value, currency, and Contact Form 7 success trigger.
Search the container for enabled Google Ads Conversion Tracking tags. Compare each candidate's numeric Conversion ID, Conversion label, and trigger with Contact form tracking note. Reuse one exact match only when it uses the Contact Form 7 success trigger. Two enabled conversion tags overlap when both use the same ID and label and can fire on the same Contact Form 7 success event. Different IDs or labels can be different Ads actions; ask the container maintainer which same-ID-and-label tag to keep before adding another tag.
If no exact enabled tag exists, select New, choose Google Ads Conversion Tracking, and enter the numeric Conversion ID and matching Conversion label from Contact form tracking note. Enter the same fixed value and currency used in Google Ads, then select the Contact Form 7 success trigger. Leave Transaction ID empty because transaction IDs are outside this Contact Form 7 lead-form setup.
Save the tag with a clear name such as Google Ads conversion — Contact Form 7 lead submitted. Reopen it and write its name, identifiers, value, currency, and trigger in Contact form tracking note under Google Tag Manager. Then return to Workspace > Overview and repeat the Container quality check: select View [number] issues, or View recommendations when it says Good. Record the current result in Contact form tracking note.
Repeat the relevant success check with consent accepted and refused, and compare tag/request behavior with the approved consent implementation. Record both results. Do not force consent to Granted or bypass the banner to obtain a passing test.
Preview must show that the invalid attempt is ignored and one successful submission fires the conversion tag once. Publish the tested container, check the same behavior in Live, then read Google Ads status separately.
Use Preview to confirm an invalid attempt does not send the Google Ads conversion.
In the connected site tab, leave one required field empty and submit the form. Return to Tag Assistant and select the gtm4wp.contactForm7InvalidInput event.
Confirm the Google Ads conversion tag did not fire on this invalid event. In Contact form tracking note, record Invalid attempt: no conversion tag fired.
Use Preview to confirm one successful submission fires the Google Ads tag exactly once.
Submit the form once with a safe sample such as Alex Example and an inbox you control if the form requires one. Do not use customer information. Wait for Contact Form 7’s success message, then return to Tag Assistant.
Open gtm4wp.contactForm7MailSent in Tag Assistant. Confirm the intended Google Ads conversion tag fired once and that the numeric Conversion ID and Conversion label match Contact form tracking note. Then open the following gtm4wp.contactForm7Submitted event and confirm the conversion tag did not fire a second time. Record both results under Preview.
Publish the tested container. A Live tag check confirms the website still sends the event; the Google Ads status is a separate check and may wait for an attributed ad interaction.
Publish the tested Google Tag Manager container version and record which version went live.
Return to Google Tag Manager, review the workspace changes, and select Submit. Choose Publish and Create Version, enter a clear version name and description, and select Publish.
Open the publish confirmation or version history. In Contact form tracking note, record the published version name or number and the container ID. Confirm there are no pending workspace changes before the Live check.
Repeat the page-load and one-submission checks in the published container.
Start a new Tag Assistant session with the form page URL recorded under Website and form in Contact form tracking note. If the session offers an environment or version selector, choose the published Live version whose name or number and container ID match Contact form tracking note. Confirm the visible session identifies the published container before testing.
Before submitting the form, open the first Live page event. Confirm the matching Google tag fired, follow the linker decision recorded in Contact form tracking note, and confirm the lead conversion tag did not fire.
Before the Live positive test, submit the Contact Form 7 form once with an invalid required field. Open the gtm4wp.contactForm7InvalidInput event and confirm the conversion tag did not fire. Record Live invalid attempt: no conversion tag fired in Contact form tracking note.
In the connected website tab, submit the Contact Form 7 form once with a safe sample, wait for the success message, and return to Tag Assistant. Confirm the conversion tag fires once on gtm4wp.contactForm7MailSent with the recorded Conversion ID and label. Open the following gtm4wp.contactForm7Submitted event and confirm the conversion tag does not fire a second time. Record the Live page-load, invalid-attempt, successful-submission, and no-duplicate results in Contact form tracking note.
Read the Google Ads status and message for the conversion action, then record what the result means.
Return to Google Ads > Goals > Conversions > Summary, find the Contact Form 7 lead-form action, and open its status details. In Contact form tracking note, record the visible status and any message Google shows.
If the status says No recent conversions or Awaiting conversions, record it and Google’s message under Ads status in your note. If Google gives a waiting time, add a date to check the report again—for example, two days from today for a 48-hour message. This is a later reporting check. Your Tag Assistant test confirms that the website sends the tracking signal; it does not show that a real ad generated a lead.
If the status says Needs attention or Misconfigured, open the details and read the named issue. Follow Google's suggested fix when it is clear; otherwise give the message to the person who maintains the Ads setup before relying on the action.