Skip to content

Magnite Bid Adapter: New ORTB Adapter for magnite (rubicon)#14476

Merged
patmmccann merged 17 commits intomasterfrom
MagniteBidAdapter
Mar 12, 2026
Merged

Magnite Bid Adapter: New ORTB Adapter for magnite (rubicon)#14476
patmmccann merged 17 commits intomasterfrom
MagniteBidAdapter

Conversation

@robertrmartinez
Copy link
Copy Markdown
Collaborator

@robertrmartinez robertrmartinez commented Feb 12, 2026

Type of change

  • New bidder adapter

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.

Comment thread modules/magniteBidAdapter.js Outdated
@robertrmartinez robertrmartinez marked this pull request as ready for review February 12, 2026 23:30
Copilot AI review requested due to automatic review settings February 12, 2026 23:30
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread modules/magniteBidAdapter.js
Comment thread modules/magniteBidAdapter.js
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js
Comment thread modules/magniteBidAdapter.js
Comment thread test/spec/modules/magniteBidAdapter_spec.js
Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js Outdated
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Feb 12, 2026

Pull Request Test Coverage Report for Build 23008250157

Details

  • 644 of 653 (98.62%) changed or added relevant lines in 5 files are covered.
  • 44 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+33.2%) to 96.365%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/magniteUtils/outstream.js 26 28 92.86%
modules/magniteBidAdapter.js 126 133 94.74%
Files with Coverage Reduction New Missed Lines %
src/adloader.js 7 88.89%
src/utils.js 37 90.51%
Totals Coverage Status
Change from base Build #3: 33.2%
Covered Lines: 218908
Relevant Lines: 227165

💛 - Coveralls

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread modules/magniteBidAdapter.js
Comment thread libraries/magniteUtils/outstream.js Outdated
Comment on lines +1 to +85
# 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
}
});
```
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

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

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah yeah im getting to it

Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js Outdated
Comment thread modules/magniteBidAdapter.js Outdated
isBidRequestValid,
buildRequests,
interpretResponse,
getUserSyncs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if you are always http2, you may want to consider alwaysHasCapacity

@patmmccann
Copy link
Copy Markdown
Collaborator

@robertrmartinez it says do not merge docs needed but now i see docs

@robertrmartinez
Copy link
Copy Markdown
Collaborator Author

Ready 🫡 @patmmccann

@robertrmartinez
Copy link
Copy Markdown
Collaborator Author

bunch of adloox rtd failures 🤔

@patmmccann
Copy link
Copy Markdown
Collaborator

hey Bobby, here is what my robot thinks is wrong
image

@patmmccann
Copy link
Copy Markdown
Collaborator

@robertrmartinez we believe this should pass with master merged in now; there was a fix for this in 11 already that @dgirardi backported

@patmmccann patmmccann merged commit 1ef2154 into master Mar 12, 2026
111 of 112 checks passed
@patmmccann patmmccann deleted the MagniteBidAdapter branch March 12, 2026 15:34
mike-lei pushed a commit to wishabi/Prebid.js that referenced this pull request Apr 21, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants