Hi Matthew,
This will be easier if you use a free form LP. A white one will do the job. Create the form in Marketo. Do not add it to the LP in the standard way, and get form embedded code instead.
It will look like this :
<script src="//app-e.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1272"></form>
<script>MktoForms2.loadForm("//app-e.marketo.com", "999-XXX-999", 1272);</script>
Just change the middle line code to :
<form id="mktoForm_1272" style="display:none"></form>
and the last line to :
<script>MktoForms2.loadForm("//app-e.marketo.com", "999-XXX-999", 1272, function(form) {
MktoForms2.whenReady(function (form) {
form.submit();
});
});
</script>
Paste the result as an HTML block in the page.
More to be found here : Forms 2.0 » Marketo Developers
-Greg
Hi Matthew,
There are several ways to 'auto submit' a form.
Basically,
1> Create a Marketo simple form landing page(may be with only email address)
2> On this landing page, add javascript code like,
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
window.document.forms[0].submit();
});
</script>
Basically, as soon as this landing page is loaded in browser, that form gets auto submitted. Assuming that the email address was pre-populated, it will create a 'form filled' event in Marketo which you can listen to in your smart campaign.
3> Have this form redirect to your SurveyMonkey form.
Hope this helps
Rajesh
Hi Rajesh,
IMHO, better use Marketo forms 2.0 API to do this.
-Greg
I agree with you.
As I said, there are multiple ways to do it. The one I mentioned is a more generic way which anyone without Marketo expertise would be able to do.
Rajesh
That is not correct. When forms may be dynamically inserted into the DOM after domReady, you must use their own API. Otherwise you are creating a race condition. Please do not recommend this going forward.
I see. Thanks
Rajesh
Why do you need to submit a form? That makes no sense.
The lead will be associated based on the Munchkin + mkt_tok alone. This is true whenever you follow an email link.
All you need to do is to be sure that Munchkin has logged the visitWebPage event, which you can do by synchronously downloading the tracking pixel before redirecting.
HI Sanford,
The idea of auto-submitting a form was just to have the first LP appear, associate the lead and disappear automatically then moving to SM without a click from the lead.
But may be there is a faster and easier idea.
-Greg
Hi Greg,
One last question I think, how can I set up the redirect to the SM page.
Thanks
A lead is associated by Munchkin initializing (fetching the tracking pixel) on a mkt_tok-enized URL. This is why association works automatically when you follow an email link, bounce off the branding domain, and arrive on your site.
Forms are only necessary if the lead does not follow an email link, but needs to identify her/himself manually (or automatically, if you get information posted over to you that identifies them).
Downloading a form just to submit it automatically, without adding any hidden fields, isn't necessary to associate leads.