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

Issue with implementing support for floor price module

Open AskRupert-DM opened this issue 5 years ago • 9 comments

Type of issue

Bug

Description

Hi

i've been looking at supporting the floor price module in my adapter (ozoneBidAdapter) per https://github.com/prebid/Prebid.js/issues/6465.

I've followed the examples listed here https://docs.prebid.org/dev-docs/modules/floors.html and when I check my adapter payload it doesn't appear to be working as expect.

(1) Defining floor prices at the ad unit level doesn't appear to be working - I just don't get the floor price object. Is there something I am missing/have defined wrong on my page config ? I am fairly certain I've followed the config as specified above so either that's missing or I've overlooked something very simple :)

(2) Defining floor price at the config level appears to work - however, I've defined different floors for banner and video and it looks like video uses/gets the same floor price as banner ? Not sure if I am doing something stupid or missing something in the config but didn't want to submit this in a PR until I was confident its working in the intended fashion

Steps to reproduce

Please see test pages - on each of them in chrome developer tools filter for 'auction' and you'll see the payload sent for each - look for bid[n].floor object - where you should be able to reproduce/see the issue listed above.

If you have debug enabled you should be able to filter in the console for - getFloor which also shows what the bidAdapter is receiving.

Test page

This one will not get any floor information, config is only in adUnits : https://www.ardm.io/ozone/2.5.1/sizeconfig-testpage-20210506-floor-adunits-only.html?pbjs_debug=true

This one will get floor information, config is in setConfig: https://www.ardm.io/ozone/2.5.1/sizeconfig-testpage-20210506-floor-setconfig-only.html?pbjs_debug=true

Expected results

a Floor object should be passed inside each individual adUnit when defining the config at ad Unit level with each media Type having its own floor.

Actual results

AdUnit level - no floor information is available.

Config level - floor information is available but the mediaTypes appear to get ignored / banner mediaType settings get applied to video when they have different floor prices defined on the config (0.8 for banner and 1.2 for video - but yet both get 0.8).

Platform details

All

AskRupert-DM avatar May 12 '21 17:05 AskRupert-DM

This is really a documentation issue. If only using adUnit floors, we need a minimum some floors definition in the setConfig, even if it’s an empty floors object:

pbjs.setConfig({ floors: {} });

bszekely1 avatar May 12 '21 19:05 bszekely1

Thanks @bszekely1 - will update my testpage tomorrow and see if that solves my problem with adUnit floors not working.

How about the second issue / testpage I shared where I am defining the floors inside pbjs.setConfig ?

I have a different floor for video vs. banner but it looks like the video floor is being ignored and the banner floor is being applied to both video and banner mediaTypes ?

AskRupert-DM avatar May 12 '21 22:05 AskRupert-DM

Hi @bszekely1 - I think both issues I flagged appear to be documentation issues !

(1) AdUnit Config not working - per your suggestion adding the setConfig object sorted that issue out.

(2) The issue around video vs. banner floors not working was down too a typo in the docs around mediatype - it should be mediaType (capital T) - when I reverted to the correct floor prices got assigned.

I think this can therefore be closed - probably worth having the docs updated in case this trips publishers or another adapter vendor up

Also one other discrepancy I saw in the docs is in some placed you refer to the function 'getFloor' and in other places its referred too as 'getFloors'

AskRupert-DM avatar May 13 '21 17:05 AskRupert-DM

FYI test pages:

Filter console for “getFloorObjectForAuction”:

-- this is how to set the config in adunits (it also needs empty object in setConfig) https://www.ardm.io/ozone/2.5.1/sizeconfig-testpage-20210506-floor-adunits-and-setconfig-minimum.html

-- this is how to set the config in setConfig https://www.ardm.io/ozone/2.5.1/sizeconfig-testpage-20210506-floor-setconfig-only.html?pbjs_debug=true (see the network request to auction - bidrequest[n].floor object)

AskRupert-DM avatar May 13 '21 17:05 AskRupert-DM

@AskRupert-DM eagerly anticipating your fix and successful transition to prebid 5. Anything we can do to help?

patmmccann avatar Jun 03 '21 16:06 patmmccann

@patmmccann sorry - apologies for the delay its all implemented we are just wrapping up our internal QA - am hoping we'll make a submission on Monday next week !

AskRupert-DM avatar Jun 04 '21 08:06 AskRupert-DM

We were planning on removing non-compliant adapters today but I will hold you guys from the removal until Monday.

After Monday, I can no longer hold as we plan to release on Wednesday.

patmmccann avatar Jun 04 '21 15:06 patmmccann

noted and appreciated @patmmccann

AskRupert-DM avatar Jun 04 '21 16:06 AskRupert-DM

See you've already seen the PR @patmmccann but its been submitted here -https://github.com/prebid/Prebid.js/pull/6946

Thought we'd get it pushed today incase any of the automated tests failed (they've passed)! !

AskRupert-DM avatar Jun 04 '21 17:06 AskRupert-DM