ad-code-manager
ad-code-manager copied to clipboard
Ad code tag still rendered if no valid ad codes found
Ad region <div>s are still rendered even if there is no matching ad code to display in them. This causes some strange output because the <div> doesn't get a proper id or size applied. For example, this is the html produced if there is no matching ad for a region:
<div style="width:%width%px; height:%height%px;" id="%tag_id%">
<script type="text/javascript">
googletag.cmd.push(function() { googletag.display('%tag_id%'); });
</script>
</div>
Would be best to skip the html entirely if no ad will be displayed.