Mobile app version of vmapp.org
Login or Join
Steve110

: Unable to collapse empty slot DFP I tried to collapse a slot and its not working .. apparently dfp mark it as not empty . googletag.cmd.push(function() { googletag.defineSlot('/21323213123/slot',

@Steve110

Posted in: #Google #GoogleAdsense #GoogleDfp

I tried to collapse a slot and its not working .. apparently dfp mark it as not empty .

googletag.cmd.push(function() {
googletag.defineSlot('/21323213123/slot', [[1, 1]], 'div-gpt-ad-31331133133-0').setTargeting('site', [ 'foot' ]).setTargeting('category', [ 'home' ]).setTargeting('page', [ '' ]).setTargeting('tag_championnat', [ '' ]).setTargeting('tag_equipe', [ '' ]).setTargeting('page_type', [ 'wp' ]).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});


The iframe generated has some tag with javascript in it

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Steve110

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sue5673885

Collapsing empty slots does not mean not creating them.
DFP will create the slot and then hide it.
Therefore there's no reason to worry about the iframe being generated unless it shows up an empty space.

Also, make sure you add the script in the <head> portion of your page, or it won't work properly.

Collapsing empty div elements

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme