Background
We use Google Ad Manager (formerly DFP) as an ad publisher for our own site. We don't want to always traffic house ads, so we're collapsing all empty divs.
slot.setCollapseEmptyDiv(true, true);
We're starting to do some programmatic ads, so we provided the third-party networks with passback tags for a specific ad unit that has some house ads line items.
<script src='https://www.googletagservices.com/tag/js/gpt.js'>
googletag.pubads().definePassback('/123456789/PassbackAdUnit', [728, 90]).display();
</script>
The Problem
The line items in the PassbackAdUnit
are all house ads, but we don't want to serve a very large amount of house ads. Those line items are set only serve a certain number or percentage of impressions. This causes the passback to somethimes result in no line item available to serve.
We would like the div to collapse as all empty ad divs do. But in this case it's not collapsing, and Publisher Console is showing the slot to be filled with the programmatic ad.
How can I make this empty div collapse?