Contact Form 7 conversion tracking in Google Ads, done right

Contact Form 7 sends its forms without loading a new page, so the classic approach of counting a conversion on a thank-you page does not work out of the box. This guide shows how to count every successfully sent Contact Form 7 message as a Google Ads conversion, with the Google tag or with Google Tag Manager, and what to watch out for.

The event to listen for

When a message has been sent, Contact Form 7 fires a DOM event called wpcf7mailsent on the form. It fires only on success: not when a field is invalid, not when the spam check fails and not when the email could not be sent. Do not use a click on the submit button as the trigger, because it also fires for forms that were never sent.

Option 1: with the Google tag

If the Google tag (gtag.js) with your Google Ads account is already on your site, create a conversion action in Google Ads under Goals → Conversions → Summary → New conversion action → Website, set it up manually and copy the send_to value, which looks like AW-123456789/AbCdEfGhIj. Then add this script to your site, for example with a code snippets plugin, in the footer:

document.addEventListener( 'wpcf7mailsent', function () {
	gtag( 'event', 'conversion', {
		send_to: 'AW-123456789/AbCdEfGhIj'
	} );
} );

Several forms on one site can share this conversion. To count only a specific form, check event.detail.contactFormId inside the listener.

Option 2: with Google Tag Manager

  1. Add a Custom HTML tag that pushes an event to the dataLayer, fired on all pages:
<script>
document.addEventListener( 'wpcf7mailsent', function ( event ) {
	window.dataLayer = window.dataLayer || [];
	window.dataLayer.push( { event: 'cf7_sent', formId: event.detail.contactFormId } );
} );
</script>
  1. Create a trigger of the type Custom Event with the event name cf7_sent.
  2. Create a Google Ads Conversion Tracking tag with your conversion ID and label, fired by this trigger. Also add a Conversion Linker tag on all pages, so the click ID is kept.
  3. Test in Preview mode, send a form and publish the container.

Mistakes that inflate or lose conversions

  • Counting button clicks. Invalid and blocked submissions are counted too.
  • Counting the same form twice. A page-view conversion on a thank-you page plus the event, or the Google tag and Tag Manager both firing, double the numbers.
  • Ignoring consent. In the EU, Google Ads tags need consent. With Consent Mode v2 Google can model conversions of visitors who decline, but only if the mode is set up.
  • Treating every form as a customer. Spam, job applications and support questions count as conversions too, and Smart Bidding learns to bring more of them.

From form conversions to real customers

The last point is the big one. A form conversion tells Google that someone wrote, not that someone bought. The better signal is to report the enquiries that became qualified leads or customers, with their value, as offline conversions.

Dealroot, a free plugin, helps with both. It saves every Contact Form 7 message as a lead with its source, campaign, keyword and gclid, and can push a generate_lead event to the dataLayer for every sent form, with the source and campaign, ready for a Tag Manager trigger. It exports your won deals as offline conversions for Google Ads, and Dealroot Pro sends qualified and won leads automatically.

Summary

Use the wpcf7mailsent event, fire one conversion per sent message, respect consent, and keep form conversions as a secondary signal. Then teach Google Ads which of those enquiries turned into customers.

See which ads pay for themselves.

Install the free plugin today. When you want your ads to learn from your sales, upgrade in a minute and keep every lead you collected.

Choose a plan Get the free plugin