Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u-l-y/b80b0d0f73b9b1bb6ef26a869be09fcb to your computer and use it in GitHub Desktop.
Save u-l-y/b80b0d0f73b9b1bb6ef26a869be09fcb to your computer and use it in GitHub Desktop.
responsive ad unit with revive ad server
<div id="revive-responsive-top" style="display: block; text-align: center;">
<script type="text/javascript">
adUnit = document.getElementById("revive-responsive-top");
adWidth = adUnit.offsetWidth;
if ( adWidth >= 728 ) {
/* Leaderboard 728x90 */
adUnit.innerHTML = '<ins data-revive-zoneid="3" data-revive-id="4689b54ec658f530f3250f4124e7f1ea"></ins>';
} else {
/* Mobile Banner 320x50 */
adUnit.innerHTML = '<ins data-revive-zoneid="5" data-revive-id="4689b54ec658f530f3250f4124e7f1ea"></ins>';
}
</script>
<script async src="//revive.example.com/www/delivery/asyncjs.php"></script>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment