-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Appnexus Bid Adapter: add support to read ortb2 keywords #8939
Conversation
tagging #8596 as related. I believe most of the special handling for Appnexus that RTB modules do is in setting these parameters. |
'key': 'appcontent', | ||
'value': ['home repair'] | ||
}, { | ||
'key': 'dyi' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you consider gathering this
Prebid.js/modules/permutiveRtdProvider.js
Line 231 in d739446
deepSetValue(bid, 'params.keywords.permutive', data.appnexus) |
Prebid.js/modules/1plusXRtdProvider.js
Line 108 in d739446
const writeToLegacySiteKeywords = LEGACY_SITE_KEYWORDS_BIDDERS.includes(bidder); |
Prebid.js/modules/airgridRtdProvider.js
Line 76 in d739446
deepSetValue(bid, 'params.keywords.perid', audiences || []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these rtd modules bypass the "normal" workflow that the data controller module is able to edit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they're populating the values under the bid.params.keywords before our request goes out, it should be gathered automatically by the logic we have already? I'm not sure how else to pre-emptively gather the data from their systems.
If they want to change their setup to have the publisher populate the ortb2 keyword fields with their data, then I suppose their customizations shouldn't be needed (if that's what you meant by 'in scope for this change').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rtd modules typically write contextual segments to site.content.data and user segments to user.data. It is in those locations that the data controller module is able to edit the segments down if necessary. We believe, since the appnexus adapter does not support either of these inputs and people seem to be using params.keywords in their place, that appnexus adapter should be responsible for copying the segments from the standard locations to the keywords instead of these modules each having special appnexus handling. It is totally reasonable to consider that out of scope however, or perhaps it is easiest to combine in this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as reference: #8614 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you transform the typical segment objects into key-value pairs; I'm looking at the samples in the first party data from the docs, and I don't see exactly how things should be pulled together?
Is this really something that would okay to implement for everyone who potentially has this data in these fields, as opposed to just doing it for these rtd modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it isn't obvious how this should be done, and each of these adapters seems to have made slightly different choices to support Xandr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone change suggest a standard approach, we can take a look and consider. If it's going to take time, then maybe it can be a future PR and we just have this PR focus on the keywords fields specifically.
Type of change
Description of change
Related to #8660
This PR adds support to read keywords from the various ortb2 fields (in the ortb2 config and the potential adUnit.ortb2Imp object.
To avoid this as a breaking change, the previous methods used by the appnexus adapter to read keyword data are still supported. The keyword keys/values are combined from the respective sources and are assigned to the proper locations in the outgoing adserver request (ie adUnit level keywords are stored inside the
tag
object that matches theadUnit
and the generic ortb2 keywords are applied at the request level).When the keys from different sources match (ie bid params and adUnit.ortb2Imp), the values are joined together in the final result to help consolidate the information and ensure all values are considered.