AnsweredAssumed Answered

Struggling to add GA event to a Marketo Landing Page

Question asked by f670188c828f9862b2d589433b301d79f7ae8c14 on Jun 23, 2015
Latest reply on Nov 15, 2015 by Grégoire Michel

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?