Magnite Bid Adapter: New ORTB Adapter for magnite (rubicon)#14476
Magnite Bid Adapter: New ORTB Adapter for magnite (rubicon)#14476patmmccann merged 17 commits intomasterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e70d15a008
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Magnite bid adapter as a replacement for the existing Rubicon adapter. The adapter is built using a modern OpenRTB integration via the ortbConverter library, making it simpler and more maintainable than the legacy Rubicon adapter. The adapter supports all standard media types (banner, video, native) and includes backward compatibility for Rubicon configurations during the transition period.
Changes:
- New ORTB-based bid adapter with clean separation of concerns using converter processors
- Comprehensive test suite covering bid validation, request building, response interpretation, and user syncs
- Documentation with clear parameter descriptions and example configurations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| modules/magniteBidAdapter.js | Core adapter implementation using ortbConverter for ORTB request/response handling, includes outstream video renderer and utility functions |
| test/spec/modules/magniteBidAdapter_spec.js | Comprehensive test suite covering adapter functionality including request grouping, chunking, ORTB data validation, and user syncs |
| modules/magniteBidAdapter.md | User-facing documentation with bid parameters, test configurations, and setup instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull Request Test Coverage Report for Build 23008250157Details
💛 - Coveralls |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Overview | ||
|
|
||
| ``` | ||
| Module Name: Magnite Bid Adapter | ||
| Module Type: Bidder Adapter | ||
| Maintainer: header-bidding@magnite.com | ||
| ``` | ||
|
|
||
| # Description | ||
|
|
||
| Connect to Magnite's exchange for bids via a full OpenRTB integration. | ||
|
|
||
| The Magnite adapter requires setup and approval from the | ||
| Magnite team. Please reach out to your account team or | ||
| header-bidding@magnite.com for more information. | ||
|
|
||
| # Bid Parameters | ||
|
|
||
| | Name | Scope | Type | Description | Example | | ||
| | ---- | ----- | ---- | ----------- | ------- | | ||
| | `accountId` | required | Number | Magnite account ID. | `14062` | | ||
| | `siteId` | required | Number | Magnite site ID. | `70608` | | ||
| | `zoneId` | required | Number | Magnite zone ID. | `498816` | | ||
|
|
||
| # Test Parameters | ||
|
|
||
| ``` | ||
| var adUnits = [ | ||
| { | ||
| code: 'test-div', | ||
| mediaTypes: { | ||
| banner: { | ||
| sizes: [[300, 250]] | ||
| } | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: "magnite", | ||
| params: { | ||
| accountId: 14062, | ||
| siteId: 70608, | ||
| zoneId: 498816 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ]; | ||
|
|
||
| var videoAdUnit = { | ||
| code: 'myVideoAdUnit', | ||
| mediaTypes: { | ||
| video: { | ||
| context: 'instream', | ||
| playerSize: [640, 480], | ||
| mimes: ['video/mp4', 'video/x-ms-wmv'], | ||
| protocols: [2, 5], | ||
| maxduration: 30, | ||
| linearity: 1, | ||
| api: [2] | ||
| } | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: 'magnite', | ||
| params: { | ||
| accountId: 14062, | ||
| siteId: 70608, | ||
| zoneId: 498816 | ||
| } | ||
| } | ||
| ] | ||
| }; | ||
| ``` | ||
|
|
||
| # Configuration | ||
|
|
||
| Add the following code to enable user syncing. By default, Prebid.js turns off user syncing through iframes. Magnite recommends enabling iframe-based user syncing to improve match rates and bid performance. | ||
|
|
||
| ```javascript | ||
| pbjs.setConfig({ | ||
| userSync: { | ||
| iframeEnabled: true | ||
| } | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
The PR description indicates that documentation should include information about migrating from the Rubicon adapter to the Magnite adapter, but the current documentation doesn't mention migration at all. Consider adding a migration guide section that explains any breaking changes, configuration differences, and steps for publishers to transition from using the 'rubicon' bidder code to 'magnite'.
There was a problem hiding this comment.
yeah yeah im getting to it
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into MagniteBidAdapter
| isBidRequestValid, | ||
| buildRequests, | ||
| interpretResponse, | ||
| getUserSyncs |
There was a problem hiding this comment.
if you are always http2, you may want to consider alwaysHasCapacity
|
@robertrmartinez it says do not merge docs needed but now i see docs |
|
Ready 🫡 @patmmccann |
|
bunch of adloox rtd failures 🤔 |
|
@robertrmartinez we believe this should pass with master merged in now; there was a fix for this in 11 already that @dgirardi backported |
…4476) * New Magnite Bid Adapter ORTB Converter * Update modules/magniteBidAdapter.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * codex suggestions * move outstream to shared util * fix tests * Update libraries/magniteUtils/outstream.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * revoke blob after ttl * translate adm_native if needed * remove transform bid params * set alwaysHasCapacity * fix lint --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Patrick McCann <patmmccann@gmail.com>

Type of change
Description of change
New bid adapter to eventually replace the Rubicon Bid Adapter.
Much more simple and easy to maintain ortb integration.
Docs will contain information on making the migration from rubicon to magnite as smooth as possible.