• Resolved addjp30

    (@addjp30)


    Hi, i would like to get details of the form when user is submitting it on Google Tag Manager. Please can you give me the code for the event please has contactform7 give for example ?

    The code from cf7 :
    <script>document.addEventListener( ‘wpcf7mailsent’, function( event ) { window.dataLayer.push({ “event” : “cf7submission”, “formId” : event.detail.contactFormId, “response” : event.detail.inputs })}); </script>

    Thanks !

Viewing 1 replies (of 1 total)
  • Plugin Author ndre

    (@ndre)

    Hi @addjp30,

    You can use the jQuery submit event to handle it.

    Example:

    jQuery( ".ic-form form" ).submit(function( event ) {
      alert( "Handler for .submit() called." );
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Get details when submit wishlist on GTM’ is closed to new replies.