Marketo Form Embedded on Wix Displaying Thank You External URL within iFrame | Community
Skip to main content
Alex_Lowe
Level 2
August 17, 2020
Solved

Marketo Form Embedded on Wix Displaying Thank You External URL within iFrame

  • August 17, 2020
  • 1 reply
  • 4808 views

We just made the switch to Wix and the functionality of our embedded Marketo forms work fine. Leads are being scored and going through the designated smart campaigns accordingly. The only hiccup is, once someone hits submit the external url set up in the form settings is displayed in the iFrame from the Wix embed code, instead of bringing the site visitor to the external page.

Here's one of the pages with the issue: luminoso.com/schedule-a-demo

This is where they are supposed to be directed after hitting submit: https://www.luminoso.com/thank-you

Any insights or tips would be greatly appreciated if anyone has run across this issue. Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

You need to redirect the parent window, not the iframe window.

 

MktoForms2.whenReady(function(mktoForm){ mktoForm.onSuccess(function(vals,thankYouURL){ window.parent.location.href = thankYouURL; return false; }); });

 

 

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
August 17, 2020

You need to redirect the parent window, not the iframe window.

 

MktoForms2.whenReady(function(mktoForm){ mktoForm.onSuccess(function(vals,thankYouURL){ window.parent.location.href = thankYouURL; return false; }); });

 

 

Alex_Lowe
Alex_LoweAuthor
Level 2
August 18, 2020

Thank you for providing this. Quick follow-up question. Do I include this code within the embed code or do I insert this in the actual page code? Many thanks.

SanfordWhiteman
Level 10
August 18, 2020

You can add this right after the call to MktoForms2.loadForm, within the embed code, yes.