Forum Moderators: martinibuster
googletag.cmd.push(function() {
// do all of the stuff to show GAM ads
});
var interval = setInterval(() => {
if (document.readyState === 'complete') {
clearInterval(interval);
// do all the stuff to show Adsense, or direct sale
}
}, 500); var x = 0;
setInterval(() => {
if (x)
// this clears the GAM slot, but how would I clear it if it's filled with Adsense?
googletag.cmd.push(function() {
googletag.pubads().clear();
});
x = 1;
googletag.cmd.push(function() {
// do all of the stuff to show GAM ads
});
var interval = setInterval(() => {
if (document.readyState === 'complete') {
clearInterval(interval);
// do all the stuff to show Adsense, or direct sale
}
}, 500);
}, 45000);