i have a link google adword :
When visitor click the link above to navigate to mysite. And then he submit a Marketo form (non Marketo form for landing page on my site). I follow this article to create Mkto form on my site: http://community.marketo.com/MarketoResource?id=kA650000000GsPJCA0 to make sure when it submit it will get values from url parameters.
My problem on here is : Normally, this form just submit to the server to handle register. Beside that, when this form submmited, i also need it submit to Marketo for tracking. That a reason, Marketo form will be submit via iframe.
When i submit marketo form, it will be target to this iframe.
So, i need pass the url parameter into iframe to make sure when submit form, hidden fields will automatic get values from url parameters. But on this iframe, as you can see, it haven't src. I had try to add this to iframe:
$("#mktoformhidden").src = window.location.href;
but it doesn't work well.
What's the iframe src should be on here?
Thanks,
Like sahutchi said, embedding the actual Marketo form into your site could be the way to go. I opted for the iframe approach to get Marketo to automatically fill in fields based on
mkt_tok
. This might be possible using Marketo forms, but I wasn't able to figure it out a month or two ago.Here's a decent overview of ways that you can integrate Marketo forms with your site: http://www.elixiter.com/marketo-landing-page-and-form-hosting-options/
If you insist on doing it the iframe way, here's my setup to pass query string params down to the embedded iframe:
This is in
http://yourdomain.com/my-marketo-page
:And in some shared library (but you can have it on the same page, and simplify it a bit):
Given that
pages.yourdomain.com
is yourCNAME
to your Marketo domain.In my email, I just link to
http://yourdomain.com/my-marketo-page
, and Marketo will automatically add themkt_tok
for that email recipient to the end of that URL (becominghttp://yourdomain.com/my-marketo-page?mkt_tok=BLAHBLAHBLAH
). Then the iframe is constructed with thedata-src
URL and all of the parameters attached, and with no scrolling nor frameborder (up to you).