@davwheat Is it possible to print a banner and rotate it when the page is changed without reloading it? I have 4 banners and I want them to rotate but I don't know if it is possible to do it with this extension.
My current setup is working when I open the page directly but I don't know how to detect that I moved to another page to refresh the banner.
Code for "Discussion page (under header)" ad unit
<div style="padding-top:10px" align="center">
<a id="publi" href="" target="_blank" title="" style="display:none">
<img id="banner" src="" style="max-width:100%; height: auto">
</a>
</div>
<script>customAds();</script>
Custom Footer
<script>
function customAds() {
let banner = ['1', '2', '3', '4'];
let img = ['1.jpg', '2.jpg', '3.jpg', '4.jpg'];
let course = ['C1', 'C2', 'C3', 'C4'];
var x = Math.floor((Math.random() * 3));
document.getElementById("publi").href = "https://www.domain.com/banner.php?id=" + banner[x];
document.getElementById("publi").title = "Course " + course[x];
document.getElementById("banner").src = "https://static.domain.com/assets/img/banner/" + img[x];
document.getElementById("publi").style.display = 'block';
}
setTimeout(function() {
customAds();
}, 1000);
</script>