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

Rise Bid Adapter: Add ORTB2 device data to request payload #12017

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

jwrosewell
Copy link
Contributor

Type of change

  • Feature
  • Updated bidder adapter

Description of change

This PR enhances the Rise bid request by incorporating device data from the global ORTB2 object.

The device object has previously been populated by simplistic parsers, if at all, and was inaccurate as a result. Prebid now benefits from RTD modules such as 51Degrees that enrich all the device object fields including Apple iPhone model category and device ID. The PR enables Rise's users to benefit from the device object.

In the spirit of other "generate" functions a generateDeviceParams function has been introduced - it serves to encapsulate the extraction of the device data from the upstream source and any customizations that might be needed. The device data seems to be added into various parts of the request, such as request.data.bids[n].sua, request.data.params.ua, request.data.params.device_type, and similar fields. We have consolidated all the device data under the request.data.device keypath. Please let us know if this keypath works or should a different one be used, s.a. request.data.params.device, or perhaps fields of the device object must be all copied under request.data.params.

Other information

cc: @lasloche

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@patmmccann
Copy link
Collaborator

@zkosanovic fyi

@jwrosewell jwrosewell marked this pull request as ready for review September 25, 2024 09:23
@jwrosewell
Copy link
Contributor Author

@lasloche @zkosanovic - this PR will ensure Rise benefits from publishers efficiently populating the device object with enriched data including iPhone model categories and other features not obtainable via SUA and UA. As publishers progress rollout this becomes more critical.

@patmmccann patmmccann self-assigned this Dec 12, 2024
@patmmccann
Copy link
Collaborator

Lgtm

@patmmccann patmmccann merged commit 52de91d into prebid:master Dec 12, 2024
5 of 6 checks passed
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.

4 participants