WordPress Forminator form Tracking with Google Tag Manager

Forminator Form Tracking with GTM

Forminator Form is a powerful and popular form builder for WordPress. Today, I will share a step-by-step guide to tracking Forminator with Google Tag Manager. In this comprehensive tutorial, I will detail how to track Forminator forms so that you can monitor them with GA4. Additionally, I will provide code that captures user-inputted values, such as email addresses, phone numbers, names, etc., to enhance conversion tracking.

Forminator Form Tracking Code

<script>
/**
* Author: Md Hasanuzzamna
* Linkedin: https://linkedin.com/in/md-h
* Youtube: https://youtube.com/@leomeasure
* Email: info@leomeasure.com
*/

(function() {
    function formDataToObject(formData) {
      var object = {};
      formData.forEach(function(value, key) {
        object[key] = value;
      });
      return object;
    }

    jQuery(document).on('forminator:form:submit:success', function (e, formData) { 
        var formDataObject = formDataToObject(formData);

        window.dataLayer = window.dataLayer || [];
        dataLayer.push({
            event: 'forminator_form_submit',
            form_id: formDataObject.form_id,
            inputs: formDataObject
        });
    });
})();
</script>

Chect it first whether it is forminator form or not

Rught click and Inspect element of your form page

Here, the class name is forminator. So, it is a forminator form.

Create a tag first

Now preview it

Submit the form page again

For Google ads

Create a variable first

For Form ID

Now create trigger

Create a tag now

Preview it

Submit the form again

Check it form google analytics

Track form submit for google ads conversion tracking

Go back to google tag manager

create two variable, one for phone number and another for email

Create another one for phone number

create another new tag

Reload google ads dashbaord now

Leave a Comment

Your email address will not be published. Required fields are marked *

Get A Quote

Please contact us for expert guidance & personalized solutions to maximizing the potential of Google Analytics for your business.

Send Us A Message

    Contact Us

    Please contact us for expert guidance & personalized solutions to maximizing the potential of Google Analytics for your business.

    Send Us A Message