Question
Run code on start and submit with Marketo forms
@Sanford Whiteman
Hello. Once a user starts a form and submits I need to run the below code. How can I do it?
When a user starts the form, run this code:
_satellite.track('form_start', {
form_type:'[ type of the form ]',
form_title:'[ document's title (if applicable) ]'
}
);When a user successfully submits the form, run this code:
_satellite.track('form_submit', {
form_type:'[ type of the form ]',
form_title:'[ document's title (if applicable) ]'
}
);Would this work for after successfully submitting the form?
MktoForms2.whenReady(function(form) {
form.onSuccess(function(values, followUpUrl) {
_satellite.track('form_submit', {
form_type:'gated content',
form_title: '[documents title]'
}
);
return false;
});
}) I'm not sure how to go about the start piece though. Any assistance would be appreciated.