Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setBidderConfig not "overriding" setConfig "Global" ortb2 #9801

Closed
spormeon opened this issue Apr 13, 2023 · 15 comments
Closed

setBidderConfig not "overriding" setConfig "Global" ortb2 #9801

spormeon opened this issue Apr 13, 2023 · 15 comments

Comments

@spormeon
Copy link

spormeon commented Apr 13, 2023

Type of issue

potential bug

Description

it seems that setting the setBidderConfig ortb2 variables are not overwriting the setConfig ortb2 "global" config, I think the video module might be doing something funky in the background to stop it, not sure

Steps to reproduce

set: ortb2
NewVideoModuleNeuwoGolf1_html_—Prebid_Publishers__Workspace

setConfig:
ortb2: {
at: 1,
allimps: 1,
bcat: ['IAB23'],
fd: 0,
cur: ['GBP'],
site: {
ext: {
inventorypartnerdomain: 'adysis.com'
},
cat: ['IAB17'],
sectioncat: ['IAB17-15'],
// pagecat: ["IAB2-2"],
content: {
// id: 'some_id',
name: "example",
episode: '1',
title: 'some title',
series: 'some series',
season: 's1',
artist: 'John Doe',
genre: 'some genre',
isrc: 'CC-XXX-YY-NNNNN',
// url: 'http://foo_url.de',
cat: ['IAB17-15', 'IAB17'],
context: '7',
keywords: 'sports,golf',
live: '0'
},
keywords: 'sports, golf',
privacypolicy: 1,
mobile: 1,
publisher: {
// domain: 'adysis.com',
name: 'adysis',
cat: 'IAB17'
}
},
user: {
yob: 1985,
gender: "m",
keywords: "sports,golf",
data: [{
name: "dataprovider.com",
ext: { segtax: 4 },
segment: [
{ id: "1" }
]
}],
ext: {
data: {
registered: true,
interests: ["sports"]
}
}
}
},

setbidderconfig: trying to reduce the amount of variables sent to IX bidder

adyjs.setBidderConfig({
bidders: ['ix'],
config: {
ortb2: {
at: 1,
allimps: 1,
bcat: ['IAB23'],
fd: 0,
cur: ['GBP'],
site: {
ext: {
inventorypartnerdomain: 'adysis.com'
},
cat: ['IAB17'],
sectioncat: ['IAB17-15'],
// pagecat: ["IAB2-2"],
content: {
// id: 'some_id',
// name: "example",
// episode: '1',
// title: 'some title',
// series: 'some series',
// season: 's1',
// artist: 'John Doe',
// genre: 'some genre',
// isrc: 'CC-XXX-YY-NNNNN',
// url: 'http://foo_url.de',
cat: ['IAB17-15', 'IAB17'],
context: '7',
keywords: 'sports,golf',
live: '0'
},
keywords: 'sports, golf',
privacypolicy: 1,
mobile: 1,
publisher: {
// domain: 'adysis.com',
name: 'adysis',
cat: 'IAB17'
}
},
user: {
yob: 1985,
gender: "m",
keywords: "sports,golf",
data: [{
name: "dataprovider.com",
ext: { segtax: 4 },
segment: [
{ id: "1" }
]
}],
ext: {
data: {
registered: true,
interests: ["sports"]
}
}
}
},
}
});

request still sends the setConfig "global" ortb2 variables:
DevTools_-_cdn_adysis_com_VideoDemo_DemoSite_pages_NewVideoModuleNeuwoGolf1_html

Test page

@ChrisHuie has the test page and @karimMourra has it I think

Expected results

setBidderConfig variables to be sent to IX, over riding setConfig variables

Actual results

setConfig variables being sent for IX

Platform details

P7.44.0, mac, chrome

Other information

might be related to something similar as #9710 which is the floors stopping auction ID change, but no clue if related. at a complete guess the "video module" is over riding in back ground or something, maybe

@patmmccann
Copy link
Collaborator

Interesting, we'd always thought of bidder config as adding information, not removing it. What's the use case here?

@spormeon
Copy link
Author

bidderB as in the docs here (bottom of page), https://docs.prebid.org/dev-docs/publisher-api-reference/setBidderConfig.html . Says "it will receive this override definition rather than whatever else might have been defined globally." thats reads as "take these variables, instead of the setConfig ones" to me. Use case is IX throws error when the ortb2 variables are too long in effect, so want to "reduce" the amount sent:
DevTools_-_cdn_adysis_com_VideoDemo_DemoSite_pages_NewVideoModuleNeuwoGolf1_html

@spormeon
Copy link
Author

maybe some config:

setConfigOverride: true
setConfigReplace: true

might do it?

@ChrisHuie ChrisHuie added video and removed video labels Apr 13, 2023
@dgirardi
Copy link
Collaborator

I think this is working as intended, although the example in the OP is not great to show it. Bidder config is merged with the global config, which means that it works as an override for "scalar" properties, but arrays are concatenated together. If you were for example to

setBidderConfig({
   bidders: ['ix'],
   config: {
      ortb2: {
          content: {
              keywords: 'override'
          }
      }
   }
})

you should see the IX request getting a different value for keywords.

It's not trivial to provide a usable version that replaces - because there's a lot of stuff in configuration that you probably do not want to replace (everything other than ortb2 for example). This might be easier to do from an event hook; you should already be able to do:

pbjs.onEvent('bidRequested', function(request) {
    if (request.bidderCode === 'ix') {
         request.ortb2 = ... // do whatever you wish with it here
   }
})

@patmmccann patmmccann changed the title Video Module - potential bug with setBidderConfig not "overriding"setConfig "Gloabl" ortb2 setBidderConfig not "overriding"setConfig "Gloabl" ortb2 Apr 13, 2023
@patmmccann patmmccann changed the title setBidderConfig not "overriding"setConfig "Gloabl" ortb2 setBidderConfig not "overriding" setConfig "Global" ortb2 Apr 13, 2023
@spormeon
Copy link
Author

@dgirardi ok, thnaks, the onEvent method seems to work. Not sure its the "simplest" way though, when the "video module" is ment to make things simpler/ easier for people?
DevTools_-_cdn_adysis_com_VideoDemo_DemoSite_pages_NewVideoModuleNeuwoGolf1_html

@spormeon
Copy link
Author

Ah, hang on, it gives a"knock on" effect, that i'm using the neuwo mdule which decorates the ortb2 with "contant category" info, this onEvent method then also stops the neuwo mdule from decorating ortb2

@dgirardi
Copy link
Collaborator

This doesn't seem like a video issue to me, but I agree that it's not great. We can try to think of a nicer way - but I'm not clear on the use case; as far as I understand things like cat shouldn't depend on the bidder.

Another option is to switch your setup so that you only setConfig when the setting is truly global and use setBidderConfig to add (rather than subtract). For example,

setConfig({
   ortb2: {
      content: {
         cat: ['IAB17']
      }
   }
});

setBidderConfig({
    bidders: [
       // whoever else is supposed to get 'IAB17-5'
    ],
    config: {
        ortb2: {
            content: {
                 cat: ['IAB17-5']                
            }
        }
    }
})

onEvent method then also stops the neuwo mdule from decorating ortb2

Thats a good demonstration of why it's not trivial to provide a "replace" version, it's not that clear what is being replaced.

@spormeon
Copy link
Author

spormeon commented Apr 13, 2023

can setBidderConfig take multiple values, as this dont work, its only decorates for the second one with the "multiple bidders", the IX one dont send the values/ decorate:

adyjs.setBidderConfig({
bidders: ['ix'],
config: {
ortb2: {
at: 1,
allimps: 1,
bcat: ['IAB23'],
fd: 0,
cur: ['GBP'],
site: {
ext: {
inventorypartnerdomain: 'adysis.com'
},
cat: ['IAB17'],
sectioncat: ['IAB17-15'],
// pagecat: ["IAB2-2"],
content: {
// id: 'some_id',
// name: "example",
// episode: '1',
// title: 'some title',
// series: 'some series',
// season: 's1',
// artist: 'John Doe',
// genre: 'some genre',
// isrc: 'CC-XXX-YY-NNNNN',
// url: 'http://foo_url.de',
cat: ['IAB17-15', 'IAB17'],
context: '7',
keywords: 'sports,golf',
live: '0'
},
keywords: 'sports, golf',
privacypolicy: 1,
mobile: 1,
publisher: {
// domain: 'adysis.com',
name: 'adysis',
cat: 'IAB17'
}
},
user: {
yob: 1985,
gender: "m",
keywords: "sports,golf",
data: [{
name: "dataprovider.com",
ext: {
segtax: 4
},
segment: [{
id: "1"
}]
}],
ext: {
data: {
registered: true,
interests: ["sports"]
}
}
}
}
},
bidders: ['smaato','amx','sharethrough','pubmatic','pwbid','adform','rhythmone','minutemedia','smartadserver','sovrn','33across','openx','gumgum'],
config: {
ortb2: {
at: 1,
allimps: 1,
bcat: ['IAB23'],
fd: 0,
cur: ['GBP'],
site: {
ext: {
inventorypartnerdomain: 'adysis.com'
},
cat: ['IAB17'],
sectioncat: ['IAB17-15'],
// pagecat: ["IAB2-2"],
content: {
// id: 'some_id',
name: "example",
episode: '1',
title: 'some title',
series: 'some series',
season: 's1',
artist: 'John Doe',
genre: 'some genre',
isrc: 'CC-XXX-YY-NNNNN',
// url: 'http://foo_url.de',
cat: ['IAB17-15', 'IAB17'],
context: '7',
keywords: 'sports,golf',
live: '0'
},
keywords: 'sports, golf',
privacypolicy: 1,
mobile: 1,
publisher: {
// domain: 'adysis.com',
name: 'adysis',
cat: 'IAB17'
}
},
user: {
yob: 1985,
gender: "m",
keywords: "sports,golf",
data: [{
name: "dataprovider.com",
ext: {
segtax: 4
},
segment: [{
id: "1"
}]
}],
ext: {
data: {
registered: true,
interests: ["sports"]
}
}
}
}
}
});

@spormeon
Copy link
Author

ok, I have this part sorted out now, with a load of "wangling" but I got a follow on, IX wont take the ortb2.imp which is set on the adunit, I have it set on the adunit and that seems to "contribute" towards the IX error 8 of too much FPD being sent. I tried adding ortb2.imp to the setBidderConfig for "all bidders except IX" but that dont work. Is there a way to add ortb2.imp to setBidderConfig? or is there another way to "limit" which bidders get ortb2.imp varaibles?

@dgirardi
Copy link
Collaborator

I am not sure I'm following (I don't know what it means to have "too much FPD" for just one bidder, that sounds odd to me, is IX returning errors?), but we did recently add the option to use adUnits[].bids[].ortb2Imp to set bidder-specific imp-level FPD:

https://docs.prebid.org/dev-docs/adunit-reference.html#adunitbids

e.g.

addAdUnits({
   // ...
   bids: [
       {
           bidder: 'ix',
           ortb2Imp: {
                // ...
           }        
       }
   ]
})

@spormeon
Copy link
Author

ye, they return an error 8, what ever that is

DevTools_-_cdn_adysis_com_VideoDemo_DemoSite_pages_NewVideoModuleNeuwoGolf1_html

@dgirardi
Copy link
Collaborator

My reaction is that validation is clearly overzealous, and I think the IX devs might agree since it appears that it's no longer an error condition in master - I think it will go away if you update the IX adapter, although I can't find the version where that check was removed (@ix-peiyuan ?)

@dgirardi
Copy link
Collaborator

dgirardi commented Apr 14, 2023

actually it was very recent - that error check was just removed.

@spormeon
Copy link
Author

im on V7.44.0 alreadybids:
[
{
bidder: 'ix',
ortb2Imp: {
// ...
}
}
]

dont take an array of bidders, as follows, as notjing gets sent?
bids: [
{
bidder: ['smaato','amx','sharethrough','pubmatic','pwbid','adform','rhythmone','minutemedia','smaradserver','sovrn','33across','openx','gumgum'],
ortb2Imp: {
ext: {
gpid: adysisSlot,
data: {
pbadslot: adysisSlot,
adserver: {
name: "gam",
adslot: adysisSlot
}
}
}
}
}
],
mediaTypes: {

@spormeon
Copy link
Author

ok, i'll move to v7.45.0 to get rid of the darn thing, cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants