So, I figured out a solution using the code published by Kenny E in his post: /blogs/marketowhisperer/2015/09/30/make-a-marketo-form-submission-in-the-background Essentially, I created a hidden Marketo form that submitted in the background. This meant that any activity conducted by the anonymous visitor is now attributed correctly to them as if they actually filled in a Marketo form. I did have to modify the code a bit. <script src="//app-lon02.marketo.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1554" style="display:none !important"></form> <script type="text/javascript"> MktoForms2.loadForm("//app-lon02.marketo.com", "XXX-XXX-XXX", XXXX); // $('#test-form').submit(function( event ) { document.addEventListener("DOMContentLoaded", function(){ $('#form-button').on('click', (e) => { var marketoForm = MktoForms2.allForms()[0]; let obj = { //These are the values which will be submitted to Marketo "Email": $('#Insert-Form-Field-ID').val(), "FirstName": $('#Insert-Form-Field-ID').val(), "LastName": $('#Insert-Form-Field-ID').val() }; marketoForm.addHiddenFields(obj); console.log('dump obj:', obj); marketoForm.submit(); }); }); </script>
... View more