Re: Changing domain names on form destination

Robb_Barrett
Marketo Employee

Changing domain names on form destination

Hi All - long time no see.

Working on a project now and I have a question for some of the experts (hint: Sanford Whiteman​, Grégoire Michel​, and others). To start off, an explanation of the issue. We're micrositing and adding in a new domain and CNAME. Let's say the base is www.aaa.com and the microsite is www.bbb.com. What we are trying to find is the easiest way to update LPs and Forms so that certain ones will go to aaa.com/pageName and others will go to bbb.com/pageName.

  • We don't want to change the default for landing pages to bbb.com/
  • Many of our pages were built using guided templates and have Forms added in via the standard form process.
  • Adding in an onSuccess handler with a location tag results in a double-jump: first to the LP specified in the form and then to the LP specified in the onSuccess handler.
  • In the form editor for settings, and on the LP URL settings, there's no way to change the default domain for a page.
  • In the form editor settings, the only way is to swap to External URL and then C&P in the destination

What is the easiest and most efficient way to do accomplish this? Is it through a bit of JS, or do we need to add in the external URL for each form destination?

Robb Barrett
2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Changing domain names on form destination

  • Adding in an onSuccess handler with a location tag results in a double-jump: first to the LP specified in the form and then to the LP specified in the onSuccess handler.

No double redirect (that's actually impossible, the browser will only end up on one or the other) but you won't be able to predict the outcome unless you

  return false;

from your onSuccess listener.

Do you want the domain of the Thank You URL to always be the same as the domain from which they posted the form?

Grégoire_Miche2
Level 10

Re: Changing domain names on form destination

HI Robb,

Adding in an onSuccess handler with a location tag results in a double-jump: first to the LP specified in the form and then to the LP specified in the onSuccess handler.

You can do better with the OnSuccess

You can for instance add a "domain" variable in the LP template and a little JS that swap the domains in the follow-up URL set in the onSuccess.

What we also do it have a JS that capture the domain in which the LP is displayed and set the same domain in the FUP, in the OnSuccess handler. This ensure consistency for all page: if the LP is displayed in aaa.com, the FUP will also be in aaa.com. If the LP is displayed in bbb.com, the FUP will be displayed in bbb.com. all automated

-Greg