Created
May 15, 2020 15:47
-
-
Save Grynn/ffeac75db058050ab8ec2aa97edddcad to your computer and use it in GitHub Desktop.
Backup House Creatives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
googletag.cmd.push(function() { | |
googletag.pubads().addEventListener('slotRenderEnded', function(e) { | |
let node = document.getElementById(e.slot.getSlotElementId()); | |
if (e.isEmpty) | |
{ | |
node.innerHTML = ` | |
<p>NO CREATIVE</p> | |
<ul><li>Fade background?</li> | |
<li>Put a fake creative / hardcoded?</li> | |
</ul> | |
`; | |
node.style.outline = "2px solid blue"; | |
} else { | |
//all good, adding green for debug. | |
jQuery(node).css('background-color' , 'lightgreen'); | |
} | |
console.log('slotRenderEnded', ({ empty: e.isEmpty, node, slot: e.slot })); | |
return; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment