Skip to main content
Level 1
Apr 25, 2025 6:25 PM UTC
Solved

Tracking conversions through an iFrame for Marketo embedded Form on Unbounce pop-up

Hi there,

I am working on an exit-intent pop-up using Unbounce for our website and embedded a Marketo Form to track email subscriptions. Unfortunately, once I fill out the subscription form on the pop-up it opens the Marketo Landing Page (Thank You page for subscribing) within the pop-up's iFrame instead of opening a new browser. Any ideas on how to adjust the form settings to push them to a new browser for the page after they subscribe? I'd like to be able to track conversions through Unbounce and have an external conversion tracking script added to this thank you landing page but so far it isn't showing as a conversion. 

As an added note, the conversion tracking script is working through other pages, so I know this is set up properly.

NiharikaGoyal
NiharikaGoyalAccepted solution
Level 3
Apr 28, 2025 5:16 AM UTC

Hi @kpaintereab I have checked your above query and you should add form onSuccess Javascript to your main landing page where the popup with the Marketo form appears. Below is the syntax that you can use:

 

<script> MktoForms2.whenReady(function(form){ form.onSuccess(function(values, followUpUrl){ // navigate parent window to your target URL return false; // Prevent default Marketo form submission behavior }); }); </script>



Hope that would helpful.

Thanks!!

6 replies

SanfordWhiteman
User Group Leader
User Group Leader
Apr 25, 2025 7:26 PM UTC

This has come up on previous threads — it’s the standard browser behavior when you use an IFRAME!

 

In order to break out of the IFRAME and redirect the top-level window, you need to use the Forms JS API onSuccess. There’s no setting in Form Editor that knows you want to do this, it needs to be done w/JS on the page hosting the form.

 

In general, IFRAME-ing Marketo forms isn’t recommended because it also affects attribution — e.g. you must also copy the query string to the IFRAME query string. You should strive to use the form embed in all cases.

Translate
NiharikaGoyal
NiharikaGoyalAccepted solution
Level 3
Apr 28, 2025 5:16 AM UTC

Hi @kpaintereab I have checked your above query and you should add form onSuccess Javascript to your main landing page where the popup with the Marketo form appears. Below is the syntax that you can use:

 

<script> MktoForms2.whenReady(function(form){ form.onSuccess(function(values, followUpUrl){ // navigate parent window to your target URL return false; // Prevent default Marketo form submission behavior }); }); </script>



Hope that would helpful.

Thanks!!

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Apr 29, 2025 4:44 PM UTC

@kpaintereab please return to your thread and check responses.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
May 13, 2025 10:18 PM UTC

@kpaintereab please return to your thread and check responses from our volunteer community members.

Translate
Level 1
May 15, 2025 7:35 PM UTC

Hi all, I resolved to use the Unbounce form and integrate it with Marketo through a static list that maps to the correct fields. It was the simplest option. Thank you for your insights! 

Translate
SanfordWhiteman
User Group Leader
User Group Leader
May 15, 2025 7:41 PM UTC

OK. That’s still not the correct solution to your problem. The correct answer is what @niharikagoyal provided, a simple JS redirect.

Translate