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

Appnexus Bid Adapter: add support to read ortb2 keywords #8939

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

jsnellbaker
Copy link
Collaborator

Type of change

  • Feature

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 the adUnit 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.

@patmmccann
Copy link
Collaborator

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'
Copy link
Collaborator

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

deepSetValue(bid, 'params.keywords.permutive', data.appnexus)
and
const writeToLegacySiteKeywords = LEGACY_SITE_KEYWORDS_BIDDERS.includes(bidder);
and
deepSetValue(bid, 'params.keywords.perid', audiences || []);
in scope for this change?

Copy link
Collaborator

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

Copy link
Collaborator Author

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').

Copy link
Collaborator

@patmmccann patmmccann Sep 1, 2022

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as reference: #8614 (review)

Copy link
Collaborator Author

@jsnellbaker jsnellbaker Sep 1, 2022

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?

Copy link
Collaborator

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

Copy link
Collaborator Author

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.

@ChrisHuie ChrisHuie changed the title appnexus bid adapter - add support to read ortb2 keywords Appnexus Bid Adapter: add support to read ortb2 keywords Sep 6, 2022
@Fawke Fawke merged commit 921d441 into master Sep 9, 2022
@Fawke Fawke deleted the appnexus_read_ortb2_keywords branch September 9, 2022 08:51
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants