javascriptadsgoogle-dfpgoogle-ad-managergoogle-publisher-tag

What is this error all zero-area slot sizes were removed?


Recently, I start getting this error from my google admanager ad unit. The error is for multisize mapping only for singlesize has no error.

[GPT] Invalid arguments: SizeMappingBuilder.addSize([356, 0], [[336, 280], [300, 250]]). All zero-area slot sizes were removed.

Following is my sizeMapping.

<script>
   googletag.cmd.push(function(){
    var adCode = { "top":'/21762728/top'};
    var adSize = {"top":[[336,280],[300,250]]};
    var TopAdMap = googletag.sizeMapping().addSize([356, 0], [[336,280],[300,250]]).addSize([0, 0], [300,250]).build();
    googletag.defineSlot(adCode.top, adSize.top, 'ad-top-slot').defineSizeMapping(TopAdMap).addService(googletag.pubads());
   });
</script>

Solution

  • I've seen the same error appear recently, when it was not problem before.

    Seems like an incorrect warning from GPT code.