Home > General > Affiliate Marketing Forum

Chrome blocking exit pop text (14)


06-14-2016 03:35 AM #1 ericnyc (Member)
Chrome blocking exit pop text

I have a simple exit pop script, below. It was working fine. Today i restarted Chrome (at which point i think it updates itself) and exit pop message got replaced with generic one. Exit pop still works fine on IE. Anyone else seeing this? To test make sure you close ALL Chrome windows and restart Chrome.

Coding gurus any fixes??? I tried googling this and cannot find anything.

http://screencloud.net/v/yaG


<script language="javascript">
var PreventExitPop = true;
function ExitPop() {
if(PreventExitPop != false) {
return "WAIT! \n\nWe are the most exclusive....... \n\n"
}
}
window.onbeforeunload = ExitPop;
</script>


06-14-2016 04:10 AM #2 herefornow (Member)

Same here , 3 diff script, no go and same s... with Firefox


06-14-2016 04:20 AM #3 thien425 (Member)

I was actually going to make a post to ask about the same thing, Firefox for me also.


06-14-2016 09:02 AM #4 kaltera (Member)

It looks like "onbeforeload" is no longer supported with Chrome 51

https://productforums.google.com/for...me/TGpWRjUwrEM


06-15-2016 03:32 AM #5 herefornow (Member)

No Solution here ?


06-15-2016 04:48 AM #6 jurtzi (Member)

Custom message is not allowed anymore, from Google Chrome 51 and future versions.

These pages show the update: https://developers.google.com/web/up...reload-dialogs

https://www.chromestatus.com/feature/5349061406228480

"Unfortunately, it is often used to scam users."

However, there is a solution, in fact, it is more "fancy" that the custom exit alert message.

If you go to for example: 3weekdiet.com and then try to close the window, you'll see an exit alert and a custom HTML message. This might substitute the classic exit alert message, worth a try.


06-15-2016 06:52 AM #7 johner911 (Member)

The current status of the custom js dialog according to my recent testing (2 days ago).
I may have some browsers outdate, since on the link jurtzi posted it states that Safari has this implemented also.

NOT WORKING:
Chrome - no custom dialog
Opera - no custom dialog
Firefox - not firing exit at all

WORKING:
Safari
Ie
Edge


06-15-2016 07:32 PM #8 bobliu (Member)

You can workaround this by creating JS code to follow the mouse, if it moves in the off window direction, fire a dialog.


06-16-2016 02:26 AM #9 herefornow (Member)

Yeah on Exit intent , but we already have that , just need the exit too , still same everywhere not working Chrome, Opera , firefox


06-16-2016 06:58 AM #10 vitavee ()

What about that one that I just crafted for you

It's a mix between exit intent and unblockable alert box.

Works on all browsers and mobiles I've tested so far (which are just chrome, firefox, and chrome mobile on android, so more tests are welcome)

http://dev.funnelflux.com/tests/newexitpop.html

Here's the code, you'll want to change the 2 variables at the top with your message and the redirect url:

Code:
<script>

window.exitMessage = "Your custom message here";
window.redirectURL = "http://bing.com";

function exitStopper()
{
    alert(window.exitMessage);

    if( window.redirectURL )
    {
        window.location.href = window.redirectURL;
    }
}

window.addEventListener('blur', exitStopper );
document.body.addEventListener("mouseleave", function(e)
{
    if( e.offsetY <= 0 )
    {
        exitStopper();
    }
}, false);

</script>
It even triggers on tab changes, in case the mouse is in the tab area and the user never scrolls into the page's area.


07-05-2016 06:53 PM #11 ametzgus (Member)

Quote Originally Posted by vitavee View Post
What about that one that I just crafted for you

It's a mix between exit intent and unblockable alert box.

Works on all browsers and mobiles I've tested so far (which are just chrome, firefox, and chrome mobile on android, so more tests are welcome)

http://dev.funnelflux.com/tests/newexitpop.html

Here's the code, you'll want to change the 2 variables at the top with your message and the redirect url:

Code:
<script>

window.exitMessage = "Your custom message here";
window.redirectURL = "http://bing.com";

function exitStopper()
{
    alert(window.exitMessage);

    if( window.redirectURL )
    {
        window.location.href = window.redirectURL;
    }
}

window.addEventListener('blur', exitStopper );
document.body.addEventListener("mouseleave", function(e)
{
    if( e.offsetY <= 0 )
    {
        exitStopper();
    }
}, false);

</script>
It even triggers on tab changes, in case the mouse is in the tab area and the user never scrolls into the page's area.
Just stumbled upon this and it still seems to work well on desktop (at least safari), but only works when changing tabs on mobile, does nothing with back button or exit.

Also, maybe is there anything a little less aggressive? Something just alerts when closing browser and that's not uncloseable?


07-26-2016 09:49 PM #12 herefornow (Member)

Bump :-) still no other solution ?


08-02-2016 09:31 AM #13 hmedia (Member)

Quote Originally Posted by vitavee View Post
What about that one that I just crafted for you

It's a mix between exit intent and unblockable alert box.

Works on all browsers and mobiles I've tested so far (which are just chrome, firefox, and chrome mobile on android, so more tests are welcome)

http://dev.funnelflux.com/tests/newexitpop.html

Here's the code, you'll want to change the 2 variables at the top with your message and the redirect url:

Code:
<script>

window.exitMessage = "Your custom message here";
window.redirectURL = "http://bing.com";

function exitStopper()
{
    alert(window.exitMessage);

    if( window.redirectURL )
    {
        window.location.href = window.redirectURL;
    }
}

window.addEventListener('blur', exitStopper );
document.body.addEventListener("mouseleave", function(e)
{
    if( e.offsetY <= 0 )
    {
        exitStopper();
    }
}, false);

</script>
It even triggers on tab changes, in case the mouse is in the tab area and the user never scrolls into the page's area.
i just tried your code and it works perfect, however on some of my lps the exit pop gets triggered on clicking on one of my outgoing urls. how can i prevent this?


03-09-2017 11:48 AM #14 weekendwarrior (Member)

I just tested the above script on Safari and Chrome browsers. Unfortunately, it gives me these responses - Safari is good - but Chrome is not:
1. Safari - Custom message fires fine and then you click close and redirects to page
2. Chrome - fires repeatedly until you click the stop (Version 56.0.2924.87 (64-bit))


Home > General > Affiliate Marketing Forum