Skip to content

Track Google Ads Enhanced Conversions through Forminator

In this article, we will focus on setting up Enhanced Conversions in WordPress, using Forminator and Google Tag Manager.

We’ve discussed about why Enhanced Conversions are a must-have for Google Ads, and we went over the simplest way to set them up, through CSS Selectors.

However, even though the CSS Selectors method is generic and pretty straightforward, it may not work for all forms. If you can’t validate the form, you need to look at other ways, such as setting up Enhanced Conversions through Google Tag Manager’s Data Layer.

I won’t go through what the Data Layer is, but you should know that it’s it is the fastest way to level up your data collection across web properties. If you want to learn more about it, I strongly suggest you head over to Analytics Mania. Their Tag Manager tutorial is also amazing and highly recommended.

Prerequisites

In my opinion, Forminator is one of the best Contact Form plugins out there. The free version is arguably one of the best of any free plugins.

We recommend Forminator as a replacement for Hubspot’s Free Tier Forms, as the Hubspot Integration is free, it can help you get rid of the branding message, and can also set up Enhanced Conversions without paying for Marketing Hub Pro.

Make Forminator push more data to the Data Layer

There is, however, a problem. By default, Forminator doesn’t push too much data to the Data Layer. I don’t know why they haven’t fixed this yet, as other plugins do push more data, but it’s something we’ll have to take care of.

Luckily, this issue was raised in their support forums, and the solution is also in there. We just have to add a piece of code to WordPress.

For this, you can use any plugin that allows you to add code snippets to WordPress. We’ll use WPCode. Here’s what you need to do:

  1. Add WPCode to your WordPress site.

2. Create a new code snippet in WPCode and add the following code:

<script>

jQuery('form#forminator-module-21').on('forminator:form:submit:success', function (e, formData) {

let formDataOb = {};



for (const [key, value]  of formData.entries()) {

formDataOb[key] = value;

}



dataLayer.push(

{

'event': 'formi_donation_form_21_submission',

'formData': formDataOb,

}



);



});

</script>

3. Under Insertion, make sure the code is inserted under the site-wide body.

wpcode forminator data layer settings

Setting up Enhanced Conversions

This next part focuses only on setting up Enhanced Conversions. If you don’t have Forminator Conversion Tracking set up through Tag Manager, make sure you do that before.

  1. Go to Tag Manager, find, and Click on the Google Ads Conversion Tag
  2. Click to edit the Tag Configuration and scroll down to “Include user-provided data from your website”
    screenshot 2023 11 22 141411
  3. Check that, and select New Variable
  4. Give the variable a name, like “User-Provided Data – Manual Collection”
  5. Select Manual Configuration
    user provided data manual config
  6. Click on the Email field, scroll down and select New Variable
  7. Name the new variable something like “DLV – EC – Email”
  8. Click on Variable Configuration, and select Data Layer Variable
  9. Under Data Layer Variable Name add formData.email-1
    forminator data layer email variable
  10. Click on the Phone field, select New Variable
  11. Name the new variable “DLV – EC – Phone”
  12. Click on Variable Configuration, and select Data Layer Variable
  13. Under Data Layer Variable Name add formData.phone-1
    forminator phone data layer variable
  14. Save everything.

Now for the testing. If you go to Tag Assistant, submit the form, and look at the AjaxComplete event, you should see the values populated under the Conversion Action, as well as under Variables.

Now, I only suggest you just create variables for the email and phone. Those are more than enough for Enhanced Conversions to work properly. If your form gathers more data, here are all the values from the Data Layer:

First Name: formData.name-1-first-name
Last Name: formData.name-1-last-name
Email: formData.email-1
Phone: formData.phone-1
Address: formData.address-1-street_address
City: formData.address-1-city
Region: formData.address-1-state
Country: formData.address-1-country
Postcode: formData.address-1-zip

Again, I only recommend using email and phone, or just email. Sending all this data is a privacy concern, and asking someone for all that data will greatly decrease the conversion rate.

Leave a Reply

Adrian Salcu