Hi Natalie Lambert,
I would do it in Google Analytics. I would add a short code to the forms 2.0 embedded javascript to trigger a GA event each time the form is filled out and then go to GA and count the events.
If you use UA, the script will look like this one :
<script src="//app-e.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_YYYY"></form>
<script>MktoForms2.loadForm("//app-e.marketo.com", "XXX-NNN-XXX", YYYY, function(form) {
var ga_label = document.location.pathname + '#formId=' + form.getId();
form.onSuccess(function(){
ga('send','event','Mkto Form','submit',ga_label);
});
});
</script>
As you also could do it on Marketo LPs, you would have all the reporting you need in GA. The GA reporting will much more complete, as you can cross the info with traffic sources, or restrict to certain period of time.
-Greg
Greg, you must not do it this way or you'll lose GA hits! You have to use the hitCallback parameter:
form.onSuccess(function(vals, thankYouURL) {
ga('send', 'event', {
eventCategory: 'Mkto Form',
eventAction: 'submit',
eventLabel: ga_label,
hitCallback: function() { document.location.href=thankYouURL; }
});
return false;
});
Hi Sanford,
Thx ! I learnt something today
for those interested, here is the doc : Sending Data to Google Analytics | Analytics for Web (analytics.js) | Google Developers
-Greg
Hi Sanford,
What do you put in thankYouURL ? Is it supposed to automatically contain the URL of the follow-up for the form in the LP?
-Greg
Yes, the second argument passed to the onSuccess listener is the follow-up/thank you URL.
I added a score that counts the number of form submits, it's just a total field adding one each time.
I added a score that counts the number of form submits, it's just a total field adding one each time.
But then you would have to sum over the scores for all leads.