I am trying to have 2 functions execute onsuccess. One is to hide the form and show a thank you message, which we already have working. We want an additional function to send a GA event so GTM can fire additional scripts.
Here is my current form HTML with the thank you message:
<script>MktoForms2.loadForm("//app-sj04.marketo.com", "XXX-XXX-XXX", 1516);</script>
//Add an onSuccess handler
//get the form's jQuery element and hide it
document.getElementById('confirmformcatalog').style.visibility = 'visible';
//return false to prevent the submission handler from taking the lead to the follow up url.
Here is the GA event code I want to insert onsuccess as well. I am not a developer so I'm not sure how to add it to the code above. Can I get some help turning this into working form code? Much appreciated.