Struggling to add GA event to a Marketo Landing Page
I have this Landing Page in Marketo: Download Mobile Usability Report 2014
I want to track conversions in GA. It seems the best way to do this is by setting the download action on the button to be a GA Event.
I added this code and it does not fire any events into GA...
$(document).ready(function() { $("form#mktoForm_1012").each(
function() { var jqForm = $(this); var jsForm = this; var action = jqForm.attr("action"); jqForm.submit(function(event) { // when someone submits the form(s) event.preventDefault(); // don't submit the form yet _gaq.push(["_trackEvent", "Reports", "Downloaded", action, , false]); // create a custom event setTimeout(function() { // now wait 300 milliseconds... jsForm.submit(); // ... and continue with the form submission },300); }); }); });
Can anyone help me please?