0

I used the following tool to create a popup to my site: http://beeker.io/exit-intent-popup-script-tutorial. It displays on desktop, but not mobile. It's purpose is to show a popup when the user wants to leave the page.

<script type="text/javascript" src="/files/bioep"></script>
<script type="text/javascript">
    bioEp.init({
    height: 165,
    html: "<div id='exit_pop'><h2>Find Out What Makes the CE&nbsp;Pro&nbsp;100 So Successful</h2><span>Download our free research report</span><a class='btn btn-lg btn-danger' href='https://ehpub.clickfunnels.com/optin8877854' target='_blank' onClick='ga('send', 'event', 'exit pop', 'click', 'CE Pro 100');' role='button'>Download My Copy</a></div>",
    css: "#exit_pop {text-align:center;} #exit_pop h2 {font-size: 18pt; margin: 10px;} #exit_pop span {margin: 0 0 20px 0; display: block;}",
    cookieExp: 1
});
</script>

I need to have it display on mobile, so I was thinking of creating a separate popup. Since exit intent can't be monitored on mobile, I would like to just set a timer and have it display after 45 seconds. I've tried a couple things and nothing seems to work. Has anyone ever had 2 separate pop-ups? (1 desktop, 1 mobile). Any tips? Or even better, has anyone used this tool and got it to work on mobile?

Thanks.

AllInOne
  • 1,450
  • 2
  • 14
  • 32

1 Answers1

0

I know this is a few months old but it came up in a search so here's what I do...

I use the same exit intent script. I load the html and css into the page via an ajax call and have the css prefixed so as not to interfere with anything else.

I have a blank init so it used my other html:

bioEp.init({
html: '',
css: ''
});

Then I check if the device is a mobile and if so append the following into head:

window.onbeforeunload = function() {
bioEp.showPopup();
return "Are you sure you want to leave?";
}

If the user hits the back button or goes to reload the page, the popup shows along with the dialog asking if they want to leave the page. Unfortunately, the dialog is something you have to put up with - no way of doing it without it.

Phright
  • 179
  • 4