Hey,
could someone quick share with me a simple mobile popunder script?
Thanks in forward!
My tech did it already, thanks anyways
<script>
var popunder="http://www.google.de"
var winfeatures="width=600,height=600,scrollbars=1,res izable=1,toolbar=1,location=1,menubar=1,status=1,d irectories=0"
var once_per_session=1
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}
function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}
if (once_per_session==0)
loadpopunder()
else
loadornot()
</script>
Check to see if it works with all browsers. I used one of these on desktop, it was a pop-over with chrome and there was no way to make it pop-under.
What I did was to open a new window after the user clicked on the CTA, and the old window did the redirect.
On mobile they recommend to open links on the same window... So my solution does not work here.
Yeah I'm not sure how a popunder would work on mobile. Ideally you could make a new tab open once someone clicks your CTA whilst staying on the current window. The once the user is done with your page, they close that window, and be shown the next tab on the browser.
The downside of course being you may negatively impact your normal lander/offer's performance due to decreased throughput, i.e. making the mobile connection download 2 different pages at once. Could of course make the popunder a small page with a 10s redirect so that it's delayed.
Doubtful, at least not without malware or installation of some plugin/app. If you want the user's browser to pop it then their browser needs to be able to load the code, which it won't do if the page isn't open.
As a workaround you could load the offer in an iFrame of sorts and have a delayed pop on that. Of course the offer would have to be able to load properly in that iframe, be allowed by the advertiser, and you would need to time it to pop before they navigate away from that page. You could also do a php include but the issue is that many pages get broken functionality when you do this.
okok, good to know. I have some frothy ideas
yeah that code above doesnt work at all lol