Track Elementor Form Submission Google Analytics (GA4) with Google Tag Manager

Standard

To Track Elementor form submissions with Google Analytics 4 (GA4) using Google Tag Manager (GTM), you’ll need to create a custom tag in GTM that fires on form submissions and sends the data to GA4 as events.

To Track Elementor form submissions with Google Tag Manager (GTM), you’ll need to create a custom tag in GTM that fires when a form is submitted and pushes the form data to the data layer. The form data can then be used in other GTM tags or triggers to track the form submissions as events in Google Analytics 4 (GA4) or other marketing and analytics tools.

To push Elementor form submission data to the data layer using Javascript, you’ll need to listen for the elementor/forms/submit/success event and use dataLayer.push() to add the form data to the data layer.

Here is an example of how to do this:

  • Make sure you have both Elementor and GTM installed on your website.
  • In Elementor, create a form and make note of the form ID or class name.
  • In GTM, create a new custom tag and choose “Custom HTML” as the tag type.
  • In the HTML editor, add the following script:
<script>
  document.addEventListener("elementor/forms/submit/success", function(event) {
    if (event.target.id === 'form-id') {
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        'event': 'elementor_form_submission',
        'formId': event.target.id,
        'submissionDate': new Date().toISOString(),
        'userInputs': event.detail.fields
      });
    }
  });
</script>

Note: Replace ‘form-id’ with the actual ID of your Elementor form.

  • Add a trigger for the tag, and choose “Custom Event” as the trigger type.
  • In the trigger’s configuration, enter “elementor_form_submission” as the event name.
  • Publish the changes to your GTM container.

Note: Replace ‘form-id’ with the actual ID of your Elementor form. This code listens for the elementor/forms/submit/success event and pushes an object with form data to the data layer when the form is successfully submitted. The data layer object includes the form ID, submission date, and user inputs. You can access this data in other tags or scripts that have access to the data layer.

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

I am available for Hire on Freelancer: Freelancer.com

I am available for Hire on Upwork: Upwork.com

I am available for Hire on Peopleperhour: Peopleperhour.com

I am available for Hire on Guru: Guru.com

Leave a Reply

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