• Resolved lonfirebrand

    (@lonfirebrand)


    Since you preventDefault on submit, I can’t use regular GTM form tracking.
    Is there a way I can specify an on_success callback or something so I can send an event to Google Tag Manager?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there, @lonfirebrand ??

    You can hook your JavaScript code to happyforms.submitted event that gets triggered on HappyForms’ <form> element. If you use jQuery, here’s an example of how it can look like:

    $( '.happyforms-form form' ).on( 'happyforms.submitted', function( event, response ) {
      // your custom code
    } );

    Hope this helps! ??

    Thread Starter lonfirebrand

    (@lonfirebrand)

    Perfect.
    Thanks.
    You might want to put those methods in your documentation.

    Sure thing, @lonfirebrand!

    We’re planning to extend our docs with helpful pointers for developers. We’ll be sure to include this one.

    Have a great day! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘tracking’ is closed to new replies.