Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

DFP not being called / ads not rendering

Open CLKeenan opened this issue 10 years ago • 10 comments

I'm in the process of 'upgrading' my prebid config from the legacy, non-GPT instant load config to the latest config with GPT instant load. Currently using prebid 0.10.0.

I assembled a test page with all of my ad units and parameters: http://www.course-notes.org/sites/all/libraries/prebid/prebid.html?pbjs_debug=true and everything appears to be working fine. Ads are being called, responses returned, and ads rendered.

However, when I test on an actual, single page in production (http://www.course-notes.org/us_history/notes/the_american_pageant_15th_edition/chapter_01_new_world_beginnings?pbjs_debug=true), the ad calls go out, appear to be returned, but then NOT displayed as DFP is not called (according to the HeaderBid Expert chrome plugin).

I've cleared all kinds of caches, added the other JS from the production page's header/footer to see if there was some conflict (there wasn't), and just can't seem to figure out what the deal is.

If anyone could take a look, I'd greatly appreciate it!

CLKeenan avatar Aug 15 '16 17:08 CLKeenan

you might be using safeframes in your creatives in dfp, you'll need to disable safeframe

or try to load prebid and dfp before calling your other .js file (on top) then disabling (removing) your .js files one by one until you find the one conflicting with the ads rendering.

mercuryyy avatar Aug 15 '16 20:08 mercuryyy

@mercuryyy -- thanks for your response!

I've confirmed that safeframes are not being used on any of the creatives. I also added all of the other JS/code above prebid to the test url: http://www.course-notes.org/sites/all/libraries/prebid/prebid.html and the ads still load/render fine.

I assume you meant other .JS as in the non-DFP/prebid.js tags/code, correct?

Thanks again! -Chris

CLKeenan avatar Aug 15 '16 20:08 CLKeenan

If you look at your test page and live page, you'll see you call some scripts at the footer in the live and none at the test. try coping all the javascript called at the live page and then when ads dont render remove them one by one.

mercuryyy avatar Aug 15 '16 22:08 mercuryyy

@mercuryyy Added all the footer JS to the test URL. Ads still render on test site fine.

CLKeenan avatar Aug 15 '16 22:08 CLKeenan

@CLKeenan maybe the .js is rendering a "div" id thats not called on your test page (since you dont echo the same html and div's), having seeing the ads working and the same code used in test/live thats the most plausible explanation blocking the ads from rendering in your live site.

either copy the live full html to your test page and then try to disable .js function one by one or do it on the live page version really quick

mercuryyy avatar Aug 15 '16 22:08 mercuryyy

Instant load has race conditions that haven't been fixed, see #419

brondsem avatar Aug 17 '16 16:08 brondsem

@CLKeenan Please try updating to the example here to address the race condition issue: https://github.com/prebid/Prebid.js/blob/3b0b097b712c88756b7ab2c3068272b610da28ca/integrationExamples/gpt/load_pbjs_dfp_concurrently.html

mkendall07 avatar Aug 26 '16 00:08 mkendall07

@mkendall07 -- thanks for the assistance!

Unfortunately, I'm running into the same issue it appears when testing on a single production URL:

Based on 'load_pbjs_dfp_concurrently.html' example:

Test page only (works): http://www.course-notes.org/sites/all/libraries/prebid/prebid-v2.html?pbjs_debug=true

Production page (does not work): http://www.course-notes.org/us_history/notes/the_american_pageant_15th_edition/chapter_01_new_world_beginnings?pbjs_debug=true

Google DFP console provides the following errors: Ad unit did not fetch. Ad unit did not render.

And unlike the previously referenced instantload code, changing the timeout setting to less than 500ms does not help. The ads still do not render.

CLKeenan avatar Aug 26 '16 21:08 CLKeenan

@CLKeenan The site seems to be very slow in loading the actual content. There is around 1 second delay between when the bids are back and when the 1st googletag.display call is invoked:

image

I was able to get this to work by commenting out the callback refresh (line 83) and putting googletag.cmd.push(function() { googletag.pubads().refresh(); }); at the very end of the file (line 991).

mkendall07 avatar Aug 27 '16 00:08 mkendall07

That worked! Thank you! I'll have to investigate why the site is taking so long to load the actual content as you mentioned.

CLKeenan avatar Aug 28 '16 15:08 CLKeenan