With this simple Google Tag Manager Event Listener, you can track interactions like form submission on an Elementor-built website. Simply copy the code into your Google Tag Manager with the necessary configuration and you are ready to begin collecting those events when they trigger.
How to track Elementor form submission with Google Tag Manager
Elementor is one of the most popular WordPress themes out there. It is highly likely that you would encounter a website built with Elementor in your daily activities as a digital marketer or measurement professional, hence it is very important to have this Elementor form submissions tracking skill under your belt.
You’ll need Google Tag Manager and the Elementor form submission event listener javascript code.
The code
jQuery( document ).ready(function( $ ){ jQuery( document ).on('submit_success', function(){ window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'elementorFormSubmitted' }); }); });
- Start by creating a custom HTML tag where you’ll paste the event listener code and fire it on pageview or DOM ready.
- Create a custom event with the event name [elementorFormSubmitted]
- The event happens only on successful submission of Elementor forms
- Connect your marketing tag(s) to this trigger to send events to your analytics platform like GA4.
- Trust But Verify (TBV). Test, test and debug
- Publish once everything is okay.
Credit: Created by J J Reynolds