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

Teqblaze Library: Add ORTB2 device data to request payload #12073

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

jwrosewell
Copy link
Contributor

Type of change

  • Feature
  • Updated bidder adapter

Description of change

This PR enhances bid requests formed within Teqblaze library 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 users Teqblaze-dependent bid adapters to benefit from the device object.

Affected bid adapters:

  1. acuityadsBidAdapter
  2. admanBidAdapter
  3. adprimeBidAdapter
  4. axisBidAdapter
  5. beyondmediaBidAdapter
  6. boldwinBidAdapter
  7. compassBidAdapter
  8. contentexchangeBidAdapter
  9. copper6sspBidAdapter
  10. e_volutionBidAdapter
  11. emtvBidAdapter
  12. globalsunBidAdapter
  13. iqzoneBidAdapter
  14. kiviadsBidAdapter
  15. krushmediaBidAdapter
  16. loyalBidAdapter
  17. lunamediahbBidAdapter
  18. mathildeadsBidAdapter
  19. mgidXBidAdapter
  20. mobfoxpbBidAdapter
  21. orakiBidAdapter
  22. pgamsspBidAdapter
  23. playdigoBidAdapter
  24. pubCircleBidAdapter
  25. qtBidAdapter
  26. smarthubBidAdapter
  27. visiblemeasuresBidAdapter

Other information

cc: @MaksymTeqBlaze, @teqblaze, @qt-io

Copy link

github-actions bot commented Aug 1, 2024

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! 🚀

@MaksymTeqBlaze
Copy link
Contributor

Fields such as deviceWidth, deviceHeight, and language are extracted from bidderRequest.ortb2.device. It might be better to include the full device object in the request within specific adapters rather than in the library, as doing so for most adapters could simply add extra body size.

Copy link

github-actions bot commented Aug 6, 2024

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! 🚀

@justadreamer
Copy link
Contributor

Hi @MaksymTeqBlaze! Thanks for your comment.

The oRTB device object enriched by the 51DegreesRtdProvider and potentially other RTD providers would contain standard oRTB fields s.a.: devicetype, make, model, os, osv, w, h, pxratio, ppi, and more. We think that passing this object in its entirety is beneficial for both the SSPs and publishers. Given those are standard oRTB fields - they don't add much to the payload - the above listed fields with values would probably add not more than 250 bytes.

While it is definitely safer to assume that each adapter should decide for itself whether to pass this data - it is quite tedious to add the same code to each individual adapter, also would result in a lot of code duplication, thus it is much easier to add on the common library level and should benefit every adapter. The major bidder adapters s.a. openx, magnite, xandr and others support passing the device object as is. Thus we'd strongly advocate for passing the whole device oRTB object on the common level as is in this PR.

If you still think this is harmful to individual adapters - perhaps we could consider adding a common function on the library level and some light-weight mechanism for the dependent adapters to opt-in this behavior of passing the full device object?

@justadreamer
Copy link
Contributor

Hi @MaksymTeqBlaze! What are you thoughts on the above? Thx

@patmmccann
Copy link
Collaborator

As fyi, both of you are in the prebid slack

@justadreamer
Copy link
Contributor

Thanks Patrick, just contacted @MaksymTeqBlaze on Slack. Maksym, please check my message, thanks.

@MaksymTeqBlaze
Copy link
Contributor

Yeah, we can add device to request

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! 🚀

@jwrosewell jwrosewell marked this pull request as ready for review September 23, 2024 14:01
@justadreamer
Copy link
Contributor

@MaksymTeqBlaze thanks for confirming that this is ok with you guys.

The test failing is unrelated to this PR. We thus removed Draft status and set as Ready for review.

@patmmccann thanks for stimulating the communication on this, what would be the best process to get this PR approved and merged?

@patmmccann
Copy link
Collaborator

@justadreamer pubrise test failure sure looks related to me

@patmmccann patmmccann self-assigned this Sep 25, 2024
@patmmccann patmmccann self-requested a review September 25, 2024 12:16
Copy link
Collaborator

@patmmccann patmmccann left a comment

Choose a reason for hiding this comment

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

Test failures do appear related to me

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! 🚀

@BohdanVV
Copy link
Contributor

Test failures do appear related to me

Hi @patmmccann,

It turns out I missed some errors in the tests because new bidders were switched to Teqblaze, and I wasn't aware of them. Thanks for the heads up!

I've fixed the tests, and the CI/CD is passing. I think it can be merged now. Thanks!

@patmmccann patmmccann merged commit d50290c into prebid:master Sep 27, 2024
5 of 6 checks passed
@BohdanVV BohdanVV deleted the teqblazeLibrary-add-ortb2-device branch October 8, 2024 13:45
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.

5 participants