Closed EskelCz closed 1 year ago
@EskelCz Thanks for flagging, will get a fix ASAP.
A workaround is to remove the position
params in your rubicon bids
for adUnits which have native
(I know not really a "workaround", but the request will be sent)
Here is example code which will delete the rubicon param position
for any adUnit that has native
mediaType.
( Or you can just edit the adunits directly of course )
pbjs.onEvent('beforeRequestBids', adUnits => {
adUnits.forEach(adUnit => {
if (adUnit.mediaTypes.hasOwnProperty('native')) {
adUnit.bids.forEach(bid => {
if (bid.bidder === 'rubicon') delete bid.params.position;
});
}
});
});
Executing this on your test page and then running an auction has the Rubicon Native Ad Request sent as expected:
Thanks for finding and sorry for the inconvenience!
Also FYI, the Rubicon Prebid Server Adapter requires event trackers
in native requests:
From Rubicon PBS Error Response: "Error in native object for imp with id native-3: Eventtrackers are not present or not of array type"
I have reached out to our team for more clarity on if this requirement will remain in the future or not.
@robertrmartinez That was fast, I'm shocked. :) Thanks a lot for the quick fix.
As for the event trackers
issue, I must admit I have no idea what is happening there. Can you please elaborate? Is it something I need to handle on our end, or is that another adapter issue?
We updated the Rubicon Adapter to support native somewhat recently.
It sends an ORTB2 Native request to our exchange.
It looks like you still declare your prebid native adUnits using the "Legacy" prebid format:
This is transformed into ORTB and then sent.
Well, the Rubicon (Magnite) SSP requires the ORTB native request field called eventtrackers
See section 4.7 Event Trackers Request Object
in the ORTB Native 1.2 Spec
This is optional
in ORTB, but our exchange has deemed it as required
as of now. Unsure if it will change anytime soon, but that was the direction given.
Hope this helps clear it up @EskelCz
If you have any questions about this requirement or any other native questions, please first reach out to your Magnite account representative and they should be able to assist.
@robertrmartinez I see, that clears it up. I'll use the ORTB configuration and add an empty eventtrackers array, that's no problem. Thanks a lot
@robertrmartinez I'm testing the fix in 8.12 and I'm seeing another error in the network request. First it shows kind of a misleading warning in console:
You can see it live here: https://playground.cpex.cz/native
Then in network request is the actual error:
"Error in native object for imp with id native-3: Plcmttype is not present or not of int type"
Here's the complete request: https://www.postman.com/solar-sunset-356369/workspace/cpex-public/request/17429252-e68f23ad-0e99-4c31-851e-dc31970103dd?ctx=documentation
This is my adUnit definition:
[
{
"code": "native-3",
"mediaTypes": {
"native": {
"ortb": {
"assets": [
{
"id": 1,
"required": 1,
"img": {
"type": 1,
"wmin": 200,
"hmin": 200
}
},
{
"id": 2,
"required": 1,
"title": { "len": 800 }
},
{
"id": 3,
"required": 1,
"data": { "type": 2 }
},
{
"id": 4,
"required": 0,
"data": { "type": 1 }
}
],
"eventtrackers": []
}
}
},
"bids": [
{
"bidder": "rubicon",
"params": {
"siteId": "140646",
"zoneId": "3017262",
"accountId": "10900",
"position": "atf",
"sizes": [ 221 ]
}
}
]
}
]
It's probably some other misconfiguration on my part, but it's hard to debug since the error is from the back-end. Can you please see what's wrong?
Hi @EskelCz I am off starting today but am going to pass this along to my team so someone can help you while I am out!
Sorry for the issues! We are still ironing out some kinks in our Native setups.
Here are the validations done by the server-side rubicon adapter:
if imp.native.ver is 1.2, unpack the imp.native.request field and make the following validations:
These are the rules of the exchange.
@bretg Thanks, I missed that in the docs https://docs.prebid.org/dev-docs/bidders/rubicon.html#native
But there is no information what the values of context
and plcmttype
mean.
I searched Magnite docs and found it only on this page: https://resources.rubiconproject.com/resource/xapi-specifications-3-2/#autoid-1-44-native-request-object But both of the attributes link to non-existent anchors. So I'm stuck. It's perplexing, such a lackluster documentation for required values. It's as if I'm the first developer trying to configure Native for Magnite. :)
EDIT: Found it at the bottom, it's just the anchors that are broken.
Thanks for the docs bug report @EskelCz. Will report it. I was going to suggest the IAB spec, but sounds like you found that.
Type of issue
Bug, probably
Description
Bid request for Native format fails with an error, trying to set .pos at a
video
object, which for native isn't there. (Cannot set properties of undefined (setting 'pos')) This line: https://github.com/prebid/Prebid.js/blob/7.39.0/modules/rubiconBidAdapter.js#L197Steps to reproduce
Test page
https://playground.cpex.cz/native (position native-3)
Expected results
No error
Actual results
Platform details
Prebid 7.39 (but the culprit line is in the latest version as well)