AnsweredAssumed Answered

GA event tracking for onSuccess

Question asked by 640b035dc0f8e19fb0fd3572ae2d63512687e56b on Apr 18, 2018
Latest reply on Apr 18, 2018 by Sanford Whiteman

I am trying to figure out what's wrong with my landing page. I am trying to keep the on-page thank you message and send a GA event. I have the thank you working as expected, but the GA event is not firing.


Here is the code that I'm using:


<script src="//"></script>


MktoForms2.whenReady(function (form){

//Add an onSuccess handler

form.onSuccess(function(values, followUpUrl){

//GA event trigger

if ( 'YES' == '${z-TriggerGAEvent}') {



//get the form's jQuery element and hide it


    document.getElementById('confirmform').style.visibility = 'visible';

    //return false to prevent the submission handler from taking the lead to the follow up url.

    return false;





The landing page lives here.


Any suggestions are much appreciated.