Re: Controlling confirmation page from an external landing page

Anonymous
Not applicable

Controlling confirmation page from an external landing page

Background:

We are building a digital campaign that is driving traffic from various online media sources to a gated landing page on our website. The form on the landing page is hosted in Marketo. We would like to use this form for all gated content.

Ask:

Are there any tips for having the external landing page control the follow page, rather than having to have this associated to the form? If this were a Marketo landing page, we could change the setting on the LP to override the form, but not sure about an external LP.

8 REPLIES 8
Grégoire_Miche2
Level 10

Re: Controlling confirmation page from an external landing page

Hi Nathan,

You need to pass the following page info as a URL parameter. Then in the landing page, you will have to use the forms 2.0 API (Forms 2.0 » Marketo Developers ) to change dynamically the follow-up page, as in this example from the doc:

MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function(form) {

   //Add an onSuccess handler

  form.onSuccess(function(values, followUpUrl) {

   // Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl

  location.href = "https://google.com/?q=marketo+forms+v2+examples";

   // Return false to prevent the submission handler continuing with its own processing

   return false;

   });

});

-Greg

Anonymous
Not applicable

Re: Controlling confirmation page from an external landing page

Thanks Grégoire!  I will work with our developers to try this out.

SanfordWhiteman
Level 10 - Community Moderator

Re: Controlling confirmation page from an external landing page

Nathan, rather than hard-coding the follow-up URL within the JS, think about using a more semantic style (separation of concerns).  Add a <link> in the <head>:

    <link rel="next" href="https://nation.marketo.com/thankyou1.html">

Then your JS is always the same on every page:

     location.href = document.querySelector('LINK[rel="next"]').href;

Anonymous
Not applicable

Re: Controlling confirmation page from an external landing page

Thanks, Can you tell me more about how would this work if we wanted the confirmation page to vary based on a landing page's content?

Anonymous
Not applicable

Re: Controlling confirmation page from an external landing page

Grégoire,

When we added the code to the landing page per the prescribed documentation examples: Forms 2.0 » Marketo Developers, we found that the form no longer rendered. If we comment the additional code out, the form works fine. See example of code here: Marketo RRLP Form .

Any thoughts on why this might be occurring?

Grégoire_Miche2
Level 10

Re: Controlling confirmation page from an external landing page

Hi Nathan,

Can you please send the URL of the LP ?

-Greg

Anonymous
Not applicable

Re: Controlling confirmation page from an external landing page

Hi Greg,

It seems that the code was referencing the wrong server. The one in the documentation is for an internal Marketo server.

Grégoire_Miche2
Level 10

Re: Controlling confirmation page from an external landing page

HI Nathan,

Indeed. You need to refer your own forms 2.0 server, so the better is to start with your form's embed code and edit it.

-Greg