-
Notifications
You must be signed in to change notification settings - Fork 751
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
Option to do array merges or permissioning on user segments #4111
Comments
@dgirardi or @patmmccann - please define a "JsStyleMerge". I don't understand "pre-concatenate" at a deep enough level to write requirements. I strongly want to avoid a true deep merge of arrays with full merging of duplicates. A simple "concatenate-with-no-deduping" approach would be ok. How are we going to know when to do a "traditionalMerge" vs a "concatenateArraysMerge"? I don't like the idea of embedding merge instruction metadata in every array. If we're talking about a limited number of ORTB locations that require this special behavior, then the thing to do is define server-side configuration for publishers/host companies to opt-in to the new behavior. Otherwise it's breaking. We need to delineate all possible destinations in ORTB where merge behavior needs to be variable:
Then we have server-side account-level configuration that defines the merge strategy. e.g. And maybe we could support an "all" keyword so all array merges (even beyond the named locations?) are concatenated? From the slack workspace: Bret: Demetrio: the best outcome is that client and server use the same merging logic for bidder config. I'm not sure if it's feasible, if js decided to conform to server on the next major release, I'd expect that to be very painful for publishers data segments would have the same problem, although maybe it's not as common to have global and bidder-specific ones there? Here's an idea: js pre-concatenates arrays. If the client side config is {ortb2: {array: [1]}} and bidder config for someBidder is {ortb2: {array: [2]}} , the PBS adapters sends {bidderconfig: {bidders: ['someBidder'], config: {ortb2: {array: [1, 2]}}}} Bret:
with
Simple concatenation will leave this with two objects where source="pubcommon" and different IDs. This is going to confuse someone downstream. Demetrio: the problem is the inconsistency between js and server. I'm hoping that pre-merging arrays client side makes it so that it looks as though server is doing the same merge as JS. |
This involves every array, but only when merging I don't see the advantage of doing this for specific parts of the request, it will quickly get out of date, and JS always uses the same logic to merge everything from bidder config.
Here's the implementation. Merging a JSON object B into a JSON object A (
|
Discussed in committee. The current proposal is:
Here's the use case: bidderA and bidderB get special EID or special data segment that other bidders should not get. However, there are many other EIDs or segments that all bidders receive. e.g.
What PBS will do in this case is overwrite existing "10 objects" with the "1 extra". This forces publishers to blow up their bidderconfig with a workaround:
So the goal here is remove the necessity of repeating the baseline data in the bidder-specific config scenario. Note: ext.prebid.bidderconfig.ortb2 only supports three top-level objects: site, app, and user. |
Since PBS does not do server side array merges, https://github.com/prebid/Prebid.js/pull/12571/files , will allow user segment arrays to be repeated for each bidder in bidder config. This can result in a very large object.
In the case of eids, there are some optimizations using eidPermissions, but this is not possible in user data segments.
This could be solvede with either a 'doJsStyleMerge' argument or a user data permission type flag.
The text was updated successfully, but these errors were encountered: