I wanted to get some help thinking through a solution for this.
First, the setting:
We have a Marketo form for requesting white papers, etc. It's embedded on our website, and there's a munchkin code on the site. When a user fills out the form, it populates two hidden fields with some URL-passed information we need. Then an automatic email goes to the user, providing a link to the white paper.
If somebody returns to the form for another request, already cookied, they get the form's "custom html for known leads", instead. This html provides a link direct to the white paper. No email is sent.
Challenge:
We want to create an Interesting Moment that passes this info into Salesforce. It seems to work for first time visitors, but we want it to also work when a returning visitor shows up - getting the custom html rather than the form.
I thought I'd read somewhere that when a visitor returns and gets the custom html this should still register as a form fill, but it didn't seem to do so. Is this correct, and what is a good way to capture this moment?
Solved! Go to Solution.
Check out MktoForms2 :: QS-aware KL HTML. Pass your ?title=<title>&type=<type> and the values are populated in the proper spots.
The KL HTML itself is dirt-simple since all the logic is brought out into the whenReady listener:
(The %-variables are not really interpreted, they're just placeholders.)
Note one wheel not worth attempting to reinvent is query string parsing. I've written my own parser in the past but it cannot come near the near-industry-standard URI.js, which is included here.
Hi again Charles,
My understanding is that the form.button needs a default="" to display a text, so the form will be {{form.button:default=the text I want}} and it should be in the custom code, together with the {{form.not you}}.
and if you want to pass to Marketo some specific target links, you should rather use a hidden field.
-Greg