Esempi di reindirizzamento popunder
Servire i popunder sotto Adblock
1
isAdblockActive = false;2
let storedDomain = null;
fetch("https://ads.exoclick.com/adblock-domains.php")
.then(r => {
if (!r.ok) {
throw new Error("La risposta di rete non era valida (" + r.status + ")");
}
return r.json();
})
.then(data => {
if (data.success && data.domain) {
storedDomain = data.domain;
} else {
logError("L'API ha restituito un errore: " + (data.message || "Errore sconosciuto"));
}
})
.catch(err => {
logError("La fetch è fallita: " + err.message);
});3
<script type="text/javascript">var isAdBlockActive=true;</script>
<script type="text/javascript" src="domains.js"></script>
<script type="text/javascript" src="ads.js" ></script>
<a id="rd" href="#" target="_blank">Redirect Domain</a>
<script>
var link = document.getElementById('rd');
link.addEventListener("click", function (){
if (isAdBlockActive) {
window.location.replace("https://" + storedDomain + "/v1/link.php?cat=&idzone=XXXXX&type=8&block=1");
} else {
window.location.replace("https://s.pemsrv.com/v1/link.php?cat=&idzone=XXXXX&type=8");
}
});
</script>Servire annunci SFW
<a id="rd" href="#" target="_blank">Redirect Domain</a>
<script>
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
}
const link = document.getElementById('rd');
const verifiedUser = getCookie("verified_user");
link.addEventListener("click", function (){
if (verifiedUser === "yes") {
window.location.replace("https://s.pemsrv.com/v1/link.php?cat=&idzone=XXXXX&type=8&ex_av=1");
}
altrimenti {
window.location.replace("https://s.pemsrv.com/v1/link.php?cat=&idzone=XXXXX&type=8&ex_av=2&blocked_ad_types=101");)
}
});
</script>Blocca le campagne con etichette specifiche quando il sito web ha un parametro specifico nel suo URL
PrecedentePopunder: opzioni di attivazione per le zone pubblicitarie popunderSuccessivoNotifiche push: come implementare una zona pubblicitaria di notifiche push
Ultimo aggiornamento
È stato utile?

