MktoForms2.whenReady(function(form){ form.addHiddenFields({ lastReferrerURL: document.referrer }); });