Re: Wordpres - Marketo integration via Form Code / not using the APO

StefanSch
Level 2

Wordpres - Marketo integration via Form Code / not using the APO

Hi everyone,

 

I am managing a WordPress site for our organization and we would now like to add  Marketo forms to several pages. Unfortunately, using the API code (Form, Rest, SOAP) is not an option here. Are there any plugins available where I can set up a form in WordPress using the standard form script, and then use this form on 10 different pages on my WordPress site? Ideally, the solution needs to be scalable to up to 100 pages using that form. 

 

Most plugins I found connect via the form API to a Marketo list.

 

Thank you everyone for your help.

Stefan

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Wordpres - Marketo integration via Form Code / not using the APO


Unfortunately, using the API code (Form, Rest, SOAP) is not an option here. Are there any plugins available where I can set up a form in WordPress using the standard form script, and then use this form on 10 different pages on my WordPress site? Ideally, the solution needs to be scalable to up to 100 pages using that form. 

 

Most plugins I found connect via the form API to a Marketo list.

 

Thank you everyone for your help.

Stefan


Nothing unfortunate about that! You don't want to use a REST or SOAP-based pseudo-form connection. They're both weaker-featured and dangerous from a DoS standpoint.

 

You want to use the form embed code and a regular Marketo form. Marketo forms are JS-powered, so they do (internally) use a client-side JavaScript API, but there's no reason for you to know anything about that if you're only dropping in the standard embed code.

 


Most plugins I found connect via the form API to a Marketo list.


I think you're confusing APIs. The Forms API is a JS API, and a form doesn't have any intrinsic connection to a static list. Most likely the plugins you're seeing are using the REST API — which, as noted above, is what you don't want to do.

StefanSch
Level 2

Re: Wordpres - Marketo integration via Form Code / not using the APO

Hi Sam,

 

Thanks for your reply. It makes all sense. Perhaps I should have explained it a bit better. I am looking for a plugin that allows me to just copy and paste the form script in and then add it to any page or trigger (e.g. download button).  However, what happens after the form completion depends on the page, sometimes it is to download a PDF and sometimes to access a video. 

 

I guess the biggest issue is that if I use the form script, it also defines what happens after someone completes the form. If I have 10 different pdfs I would need to manage 10 different forms in Marketo. Am I am seeing this right?

 

Thank you.

Stefan

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Wordpres - Marketo integration via Form Code / not using the APO


I guess the biggest issue is that if I use the form script, it also defines what happens after someone completes the form. If I have 10 different pdfs I would need to manage 10 different forms in Marketo. Am I am seeing this right?


Definitely don't need 10 different forms!  You just add a (string) field LastFormSubmissionURL to Marketo, then add that as a hidden field on the form.

 

Then a little JS sets that field's value to the current page:

MktoForms2.whenReady(function(form){
  form.addHiddenFields({
    LastFormSubmissionURL : document.location.href
  });
});

 

Then in Form Editor, you can use the Advanced Thank You pages feature to change the TY URL based on the page the form was on!

StefanSch
Level 2

Re: Wordpres - Marketo integration via Form Code / not using the APO

Thanks man. Thats pretty cool. I will give it  try