Why does my pop up fire when someone opts in?

If you’re using an exit pop up or a MagickBar on an opt-in page, depending on how you have your page setup you may notice that the pop up fires when someone opts in, or that the MagickBar remains on the “thank you” page.

In the case of the exit pop up, the reason for this is that unless you do something to prevent it, when someone opts in it results in them leaving the current page, which triggers the exit pop up – as it should.

In the case of the MagickBar, the reason is that again, unless you do something to prevent it, the thank you page is loaded in the same window and so the MagickBar stays where it is.

The solution in both cases is simple – you need to open your thank you page in a new browser window.

There are two possible solutions …


Method #1: For Both Exit Pops & MagickBars

If you have access to the HTML form code, all you have to do is add the following to your tag:

target="_blank"

For example, if your form tag looks like this:

((form action="xyz.php" method="POST"))

You just change it to this:

((form action="xyz.php" method="POST" target="_blank"))

This will cause your Thank You page to open in a new browser window, and it will solve both of the above-mentioned “problems” with exit pops or MagickBars.


Method #2: For MagickBars Only

If you don’t have access to change the form code for some reason, you can also solve the MagickBar problem by adding a few lines of JavaScript code to the “head” section of your thank you page, between the ((head))((/head)) tags:

((script language="JavaScript" type="text/javascript"))
if (top.location != location) { top.location.href = document.location.href; }
((/script))


Adding this code to your page will cause the page to automatically “break out” of the frame that is used for cloaking, which will cause the MagickBar to disappear.

Note however that this will NOT solve the exit pop up problem. For that you need to use Method #1 above.