ad-code-manager icon indicating copy to clipboard operation
ad-code-manager copied to clipboard

Ad code tag still rendered if no valid ad codes found

Open nickdaugherty opened this issue 12 years ago • 0 comments

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.

nickdaugherty avatar Apr 16 '13 21:04 nickdaugherty