Generally itâs best practice to complement form pages with unique thank you pages that are enriched with secondary CTAs. But managing unique forms for each offer is really annoying, especially when you fiddle with scoring, add/remove fields, or change pick list values. If youâre using Marketo forms with Marketo landing pages, this is really easy â Marketo has a simple UI to control the destination page:
But if youâre embedding Marketo forms on non-Marketo landing pages (like Unbounce or WordPress)? Not so easy. Instead, I almost always recommend using global forms and pointing to a unique thank you page one of two ways:
- via hidden form field
- within your CMSâ page template
>> Related: How to Integrate Unbounce Forms with Marketo <<
1. Using a hidden field for destination URLs
This is a great solution when you have a more sophisticated user creating landing pages and embedding the Marketo form. You simply:
- Create a hidden field on the form called âdestination_urlâ or similar.
- Then, you populate that hidden field with the thank-you URL of your choice.
- You include a little JavaScript on your page thatâs listening for the form submit, grabbing the value in your new âdestination_urlâ field, and redirecting visitors there.
form.onSuccess(function(vals,thankYouURL){
switch(document.location.pathname) { // or whatever you want to use to detect current page
case '/mightyfine.html':
document.location = '/thanks-mightyfine.html';
break;
case '/redredwine.html':
document.location = '/thanks-redredwine.html';
break;
...
}
return false;
});
Hereâs an example of what the hidden fields look like in an Unbounce form:
2. Using a hidden field for destination URLs
Alternatively, you could include âform IDâ and a âredirect URLâ fields in your CMS page template. These become the variables your script uses (rather than a form field). This is a great option if youâre on a configurable CMS like WordPress, and if you have less sophisticated users building form pages. Basically, you indicate on the page builder where the form redirect should go, and then you just use the forms library to redirect.
Hereâs an example of what the hidden fields look like in a WordPress page: