How to detect if a placement would be empty (Doubleclick for Publishers)?
Posted
by
EricSchaefer
on Pro Webmasters
See other posts from Pro Webmasters
or by EricSchaefer
Published on 2011-02-14T14:39:42Z
Indexed on
2011/02/14
23:35 UTC
Read the original article
Hit count: 363
advertising
|doubleclick
I want to use DFP for my ads. To display an ad I am calling GA_googleFillSlot()
. My understanding of this is, that this function injects the ad code at the position where the JS call is placed. How can I detect if the placement is empty, e.g. no banner code will be injected because there is currently no banner. I need to know because the surrounding html needs to be adapted. Any ideas?
Edit:
Alternatively, is it possible to alter the injected html elements? DFP injects a div with id="google_ads_div_$PLACEMENT_ID">. Is it possible to add a class attribute?
© Pro Webmasters or respective owner