Very simple. I need to have the ability to add various Marketo forms on the same page. Is there a way to do this?
Solved! Go to Solution.
Hmmm. That makes sense. Is there a way to fire separate dataLayer push events for each form then?
Yes, you can check the form ID in the callback:
MktoForms2.whenReady(function(mktoForm){
let formId = mktoForm.getId();
switch(formId){
case 1234:
// do something
break;
case 6789:
// do something else
break;
}
});