How to Track Elementor Form Submissions with Google Tag Manager

7 May, 2026

If you’re using Elementor Pro forms on your WordPress site and want to track submissions as conversions in Google Analytics, Facebook Ads, or other platforms, you’ll need to set up event tracking through Google Tag Manager. Here are three different methods—pick the one that works best for your setup.

Method 1: Basic Event Listener (Simplest)

This is the easiest method if you just need to know when any Elementor form is submitted.

javascript

<script>
jQuery(document).ready(function($){
  jQuery(document).on('submit_success', function(){
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      'event': 'elementorFormSubmitted'
    });
  });
});
</script>
JavaScript

Pros: Simple, clean, works immediately
Cons: No form-specific data captured

Method 2: Detailed Form Data Capture (Recommended)

This captures the form name, form ID, and page title useful when you have multiple forms and need to track them separately.

javascript

<script>
  if (window.jQuery) {
    jQuery(document).ready(function() {
      jQuery(document).on('submit_success', '.elementor-form', function(event) {
        window.dataLayer = window.dataLayer || [];
        window.dataLayer.push({
          event: 'elementor_form_submission',
          formName: event.target.getAttribute('name') || 
                    (event.target.querySelector('[name="form_id"]') ? event.target.querySelector('[name="form_id"]').value : 'unknown') || 
                    'unknown',
          formId: (event.target.querySelector('[name="form_id"]') ? event.target.querySelector('[name="form_id"]').value : 'unknown'),
          postTitle: (event.target.querySelector('[name="referer_title"]') ? event.target.querySelector('[name="referer_title"]').value : 'unknown')
        });
      });
    });
  }
</script>
JavaScript

Pros: Captures form details for better tracking
Cons: Slightly more complex

Method 3: Complete Form Field Data (Advanced)

This captures all form field values—useful when you need to pass specific data to your marketing platforms.

javascript

<script>
(function() {
    var origXMLHttpRequest = XMLHttpRequest;
    XMLHttpRequest = function() {
        var requestURL;
        var requestMethod;
        var requestBody;

        var xhr = new origXMLHttpRequest();
        var origOpen = xhr.open;
        var origSend = xhr.send;

        xhr.open = function(method, url) {
            requestURL = url;
            requestMethod = method;
            return origOpen.apply(this, arguments);
        };

        xhr.send = function(data) {
            if (/.+\/admin-ajax\.php/.test(requestURL)) {
                xhr.addEventListener('load', function() {
                    if (xhr.readyState === 4 && xhr.status === 200) {
                        var response;
                        try {
                            response = JSON.parse(xhr.responseText);
                        } catch (e) {
                            return;
                        }

                        if (response && response.success && data && typeof FormData !== 'undefined' && data instanceof FormData) {
                            requestBody = {};
                            data.forEach(function(value, key) {
                                requestBody[key] = value;
                            });

                            if (requestBody.action === "elementor_pro_forms_send_form") {
                                window.dataLayer = window.dataLayer || [];
                                window.dataLayer.push({
                                    event: 'elementor_form_submit',
                                    inputs: requestBody
                                });
                            }
                        }
                    }
                });
            }

            return origSend.apply(this, arguments);
        };

        return xhr;
    };
})();
</script>
JavaScript

Pros: Captures all form field data (name, email, phone, etc.)
Cons: More complex, intercepts AJAX requests

How to Set Up in GTM

Step 1: Create a Custom HTML Tag

  1. In Google Tag Manager, go to TagsNew
  2. Select Custom HTML
  3. Paste one of the scripts above (choose your method)
  4. Name it “Elementor – Form Listener”

Step 2: Set Trigger to All Pages

  1. Click Triggering
  2. Select All Pages
  3. Save the tag

Step 3: Create a Custom Event Trigger

  1. Go to TriggersNew
  2. Choose Custom Event
  3. Enter the event name:
    • Method 1: elementorFormSubmitted
    • Method 2: elementor_form_submission
    • Method 3: elementor_form_submit
  4. Name it “Elementor – Form Submit”
  5. Save

Step 4: Fire Your Conversion Tags

Use this trigger on your marketing tags:

  • Google Analytics 4: Create GA4 Event with event name “form_submission”
  • Facebook Pixel: Add to your Lead event
  • Google Ads: Add to conversion tracking

Accessing Form Data (Methods 2 & 3)

To use the captured data in your tags, create Data Layer Variables:

For Method 2:

  • Variable: formName → Form name
  • Variable: formId → Form ID
  • Variable: postTitle → Page title

For Method 3:

  • Variable: inputs.form_name → Form name
  • Variable: inputs.form_id → Form ID
  • Variable: inputs.email → User email
  • Variable: inputs.name → User name

Go to VariablesNewData Layer Variable and enter the variable name.

Testing Your Setup

  1. Enable GTM Preview Mode
  2. Submit a test form on your site
  3. Check the dataLayer for your event
  4. Verify your conversion tags fire
  5. Publish once confirmed

Which Method Should You Use?

  • Method 1: Quick setup, just tracking that a form was submitted
  • Method 2: Track multiple forms separately by name/ID
  • Method 3: Need specific form field data in your marketing platforms

Related Posts

How to Track WPForms Submissions with Google Tag Manager

How to Track WPForms Submissions with Google Tag Manager

If you're using WPForms on your WordPress site and want to track form submissions as conversions, here's an event listener that handles both Ajax and non-Ajax forms. What This Does WPForms can submit forms in two ways — with Ajax (no page reload) and without. Most...

read more
How to Track OnceHub Bookings with Google Tag Manager

How to Track OnceHub Bookings with Google Tag Manager

If you're using OnceHub (formerly ScheduleOnce) for appointment scheduling and want to track completed bookings as conversions in Google Analytics, Facebook Ads, or other platforms, here's a simple event listener to set it up. The OnceHub Event Listener Code...

read more

0 Comments

Submit a Comment

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

Shibbir Ahmed

Hi, I’m here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey.
Book Meeting

Search Tags

Claim FREE Audit