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

DFP Creative Size Issue

Open ehoch opened this issue 10 years ago • 6 comments

I currently set up the DFP line items the way Prebid.js recommends, with 1x1 and overridden sizes.

However, I noticed an issue. It looks like the size that DFP thinks is winning doesn't correspond with the size of the ad that actually won. While I get this doesn't impact the way Prebid.js renders, it has DFP incorrectly reporting the size. For example:

I have a flexible in-content unit that can serve a 300x250 or 728x90, depending on which pays more. It's declared as

sizes: [[300,250],[728,90]] 

Let's say a Prebid 728x90 line item won. DFP might think it was a 300x250 that won. I get that the creative is just calling pbjs.renderAd, which makes it render okay, but DFP is reporting it as a 300x250.

The issue with this is I use DFP's slotRenderEnded event and use the size of the creative in the event to control a few things such as the rendering of my "report ad" buttons and Waypoints for sticky ads.

Any ideas on how to tell DFP the correct size of the unit that won? For my purposes, I can definitely hack something to handle Prebid line items specifically, but I'd rather see if there's a way to correctly tell DFP that a 728x90 won, if this is a thing we can do.

ehoch avatar Mar 07 '16 14:03 ehoch

No way to do this w GPT without shimming setAdContentsBySlotForAsync; we could change the default creative to pass hb_size in addition to hb_adid and then add our own slot rendered event

nickjacob avatar Mar 11 '16 19:03 nickjacob

@ehoch sounds like you have 2 problems here:

  1. Reporting in DFP.
  2. To trigger the right actions at slotRenderEnded event in page.

For 2, it's possible to get the prebid winning creative's size through Prebid.js (or can be added) @mkendall07

For 1, that's going to be trickier. But sounds like that's not your primary concern. Is that true?

Heray avatar Mar 29 '16 01:03 Heray

Correct. However, with respect to 1, I'm honestly not sure how Google DFP will be calculating ActiveView viewability if it has the wrong creative size.

You are correct that 2 is definitely my bigger concern.

Right now I think my plan this week is to split up my Prebid line items into different creative sizes and target them by the hb_size key value unless someone has a better idea.

ehoch avatar Mar 29 '16 11:03 ehoch

With Prebid 0.7.0 there is a bidWon event that can be used to get data about the winning bid. @ehoch I understand you have buttons and waypoints hooked in to the DFP slotRenderEnded event, but could this be changed to use Prebid's bidWon?

protonate avatar Mar 29 '16 16:03 protonate

@protonate I just ended up splitting my line items that target hb_size to get around this.

ehoch avatar Apr 14 '16 15:04 ehoch

Sounds good, closing.

protonate avatar Apr 15 '16 21:04 protonate