SOLVED

Re: Marketo form on leadpages doesn't lead to thank you page url

Go to solution
MartinZ1
Level 2

Marketo form on leadpages doesn't lead to thank you page url

I have a Marketo form which is set up to go to a thank you page url e.g. /thank-you/ to track our conversions. However I notice when the form is HTML embedded as a pop up, it doesn't go to the thank you page url (even though the page does go to the thank you page it's just that the url stays the same). 

 

Only if I have the form HTML embedded on the page, does it go to the thank you page with the url . Is there a way to have the pop up HTML embedded form go to the thank you page with the url?

 

I have also contacted Leadpages and they said to contact Marketo.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo form on leadpages doesn't lead to thank you page url

OK. You didn’t completely describe your setup. You didn’t mention that

  1. you’re popping up an IFRAMEd landing page with the form embed on it, not using the form embed directly on the parent page (why you’re doing this, I cannot say)
  2. the parent document and the child IFRAME are on different private domains, so they can’t directly communicate

 

In this setup, to redirect the parent document to the form’s Thank You URL, you need to

  1. in the parent page, listen for a cross-origin message (i.e. postMessage API) that redirects the main doc when matching data comes in
  2. in the child IFRAME, add a custom Marketo onSuccess listener that sends a message to the parent

 

It’s fairly simple code as these things go, but you’ve forced yourself into this situation by not using the Marketo embed code on the parent. Why are you doing it this way?

View solution in original post

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo form on leadpages doesn't lead to thank you page url

Please link to your page.

 

By default, a form using MktoForms2.lightbox() goes to the Thank You URL configured in Form Editor (just like a non-lightboxed form).

 

 

Jasbir_Kaur
Level 5

Re: Marketo form on leadpages doesn't lead to thank you page url

Hi @MartinZ1 ,

 

If you are using a Marketo form, then you can also achieve this by using Form settings and can use any follow up url there.

 

Please share the LP URL in case of any confusion.

 

Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo form on leadpages doesn't lead to thank you page url


If you are using a Marketo form, then you can also achieve this by using Form settings and can use any follow up url there.

Yes, that’s what I meant by “the Thank You URL configured in Form Editor.”

MartinZ1
Level 2

Re: Marketo form on leadpages doesn't lead to thank you page url

Yes I have the thank you page on the Marketo form, embedded on a Leadpages page as a pop up but it still doesn't work.

 

Here is the page:

https://www.enghouseinteractive.com.au/enghouse-ccaas

The forms are embedded in the pictures: 

MartinZ1_0-1658712429501.png

 

 

 

 

Thank you

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo form on leadpages doesn't lead to thank you page url

OK. You didn’t completely describe your setup. You didn’t mention that

  1. you’re popping up an IFRAMEd landing page with the form embed on it, not using the form embed directly on the parent page (why you’re doing this, I cannot say)
  2. the parent document and the child IFRAME are on different private domains, so they can’t directly communicate

 

In this setup, to redirect the parent document to the form’s Thank You URL, you need to

  1. in the parent page, listen for a cross-origin message (i.e. postMessage API) that redirects the main doc when matching data comes in
  2. in the child IFRAME, add a custom Marketo onSuccess listener that sends a message to the parent

 

It’s fairly simple code as these things go, but you’ve forced yourself into this situation by not using the Marketo embed code on the parent. Why are you doing it this way?

MartinZ1
Level 2

Re: Marketo form on leadpages doesn't lead to thank you page url

OK. You didn’t completely describe your setup. You didn’t mention that

  1. you’re popping up an IFRAMEd landing page with the form embed on it, not using the form embed directly on the parent page (why you’re doing this, I cannot say)
  2. the parent document and the child IFRAME are on different private domains, so they can’t directly communicate

 

In this setup, to redirect the parent document to the form’s Thank You URL, you need to

  1. in the parent page, listen for a cross-origin message (i.e. postMessage API) that redirects the main doc when matching data comes in. How exactly do I do this?
  2. in the child IFRAME, add a custom Marketo onSuccess listener that sends a message to the parent. Not sure where this is? On the Marketo form embed code?

 

It’s fairly simple code as these things go, but you’ve forced yourself into this situation by not using the Marketo embed code on the parent. Why are you doing it this way? Because there is one main conversion (with a thank you page) that we are tracking, while these pop ups are extra conversions which we also want to track. I am simply following the directions from my manager - they want the page to look professional.

 

 

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo form on leadpages doesn't lead to thank you page url


in the parent page, listen for a cross-origin message (i.e. postMessage API) that redirects the main doc when matching data comes in. How exactly do I do this?

Are you familiar with the postMessage API? If you search my past blog posts you’ll see a lot about it. (Also tons of examples elsewhere on the web, though sadly not all of them are correct.)

 


in the child IFRAME, add a custom Marketo onSuccess listener that sends a message to the parent. Not sure where this is? On the Marketo form embed code?

In an additional <script> in the child IFRAME. You’d put it just before the closing </body> tag as it depends on the Forms 2.0 library being loaded.

 


Why are you doing it this way? Because there is one main conversion (with a thank you page) that we are tracking, while these pop ups are extra conversions which we also want to track. I am simply following the directions from my manager - they want the page to look professional.

Not sure what the IFRAME has to do with professionalism either way? (If anything, it’s less pro at a technical level to use an IFRAME when it’s not necessary.)

 

You can send any conversion info, load ROI pixels, whatever, with the embed code. The only compelling reason to use an IFRAME is if you have form CSS that is irretrievably broken if you use the form embed (because of conflicting CSS rules in the main document vs. the form).