Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsing empty div elements #9

Open
rmetente opened this issue Aug 21, 2018 · 0 comments
Open

Collapsing empty div elements #9

rmetente opened this issue Aug 21, 2018 · 0 comments

Comments

@rmetente
Copy link

rmetente commented Aug 21, 2018

Expected Behavior

When ad slots don't get filled, the empty divs should collapse by default.

Actual Behavior

Divs that are used by ads slots that don't get filled, do not collapse. These divs introduce blank spaces in the layout.

Steps to Reproduce the Behavior

Catch an ad slot that does not deliver creative, or schedule a slot to deliver an empty creative.

Additional Comments

Further details for implementation can be found here:
https://support.google.com/admanager/answer/3072674?hl=en

Desired default behavior for instances when ad slots get filled most of the time:
Add googletag.pubads().collapseEmptyDivs(); to the portion of your page to collapse a particular div only when an ad doesn't serve to its ad slot. If a slot isn't filled, the div collapses, possibly moving the page content up with it and reflowing the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant