Question

We are migrating our ad infrastructure from using adtech to DFP. We are facing a particular roadblock regarding any ads which are of the type out of page. We have pre-stitial and wallpaper/skin ads of the type out-of-page. Both face same issue.

I can see that the markup+scripts for that ad are correctly being called & inserted in the DOM right inside the oop div container we had setup. The problem seems that the iframe tag generated by GPT is setting the height & width of the iframe (which contains the markup+scripts of the ad) to 1 px each. Not only this, it is not respecting the OOP nature of the ad, since it is not setting the position to absolute & top, left as 0 in the CSS. It is not performing the busting of the iframe so to speak.

To give you bit of a context we have made sure of following things,

  • Initializing the GPT like so, var prestitialOOP = googletag.defineOutOfPageSlot('/1234567890/Core/ROS/Prestitial', 'div-gpt-ad-1397599585565-0-oop'); prestitialOOP.addService(googletag.pubads());
  • Making sure that the creative Test_Prestitial is marked as Out-of-page
  • Making sure that none of the code+css in our side does not interfere with google generated markup.

P.S. this is the link to the creative template code we are using.

Please let us know how we can debug this situation better. Also if anyone can show us a site and template where its working so we can learn from there.

FYI, when I manually set the css of the injected iframe to take over the complete viewscreen then the ad shows up fine.

Was it helpful?

Solution

I had to programatically set the width/height of the ad container. I am posting below the complete solution for doing DFP out-of-page ads like prestitial.

Markup Shell

JavaScript code to render the presttial ad

Style in LESS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top