Created
September 20, 2022 20:34
-
-
Save walkergv/5de2da75aa935bed1750a2166f213288 to your computer and use it in GitHub Desktop.
Data Layer Push for GTM Customer Event with Elementor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Always endure you have given each form a Form ID in the Elementor backend or else action will not track. | |
jQuery( document ).ready(function( $ ){ | |
jQuery( document ).on('submit_success', function(event) { | |
// for example, to submit a custom event to GTM DataLayer | |
//dataLayer.push({event:"GAEvent",eventCategory:"Form Submission", eventAction:event.target.id ,eventLabel:undefined}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment