Skip to content

MGID Bid Adapter: migrate to ortbConverter#14761

Merged
patmmccann merged 1 commit into
prebid:masterfrom
EricPoul:mgid-ortb-migration
May 5, 2026
Merged

MGID Bid Adapter: migrate to ortbConverter#14761
patmmccann merged 1 commit into
prebid:masterfrom
EricPoul:mgid-ortb-migration

Conversation

@EricPoul
Copy link
Copy Markdown
Contributor

@EricPoul EricPoul commented Apr 21, 2026

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

Update MGID Bid Adapter to use PrebidJS OpenRTB Converter.

Other information

prebid/prebid.github.io#6535

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: fb32c7898a

ℹ️ 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/mgidBidAdapter.js Outdated
Comment thread modules/mgidBidAdapter.js Outdated
Comment thread modules/mgidBidAdapter.js Outdated
Comment thread modules/mgidBidAdapter.js Fixed
Comment thread modules/mgidBidAdapter.js Fixed
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch 3 times, most recently from 7a1132b to 4ba9ca1 Compare April 22, 2026 10:34
Comment thread modules/mgidBidAdapter.js Fixed
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch 4 times, most recently from 7c6b5c6 to 0099b73 Compare April 24, 2026 17:13
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 25, 2026

Coverage Report for CI Build 24983980055

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+33.3%) to 96.414%

Details

  • Coverage increased (+33.3%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (310 of 311 lines covered, 99.68%).
  • 39 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
modules/mgidBidAdapter.js 140 139 99.29%

Coverage Regressions

39 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
src/utils.js 32 92.17%
src/adloader.js 7 89.39%

Coverage Stats

Coverage Status
Relevant Lines: 230464
Covered Lines: 222199
Line Coverage: 96.41%
Relevant Branches: 53374
Covered Branches: 43431
Branch Coverage: 81.37%
Branches in Coverage %: No
Coverage Strength: 72.72 hits per line

💛 - Coveralls

@EricPoul EricPoul force-pushed the mgid-ortb-migration branch from 0099b73 to e454930 Compare April 27, 2026 08:13
@EricPoul EricPoul marked this pull request as draft April 29, 2026 08:35
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch 6 times, most recently from a074cc0 to 51c0a28 Compare May 4, 2026 13:40
@EricPoul EricPoul marked this pull request as ready for review May 4, 2026 13:44
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: 51c0a28e10

ℹ️ 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/mgidBidAdapter.js
Comment thread modules/mgidBidAdapter.js
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch 2 times, most recently from 7c4a7ae to 9b6dedb Compare May 4, 2026 14:54
@EricPoul
Copy link
Copy Markdown
Contributor Author

EricPoul commented May 5, 2026

@codexreview

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: 9b6dedbc80

ℹ️ 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/mgidBidAdapter.js
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch from 9b6dedb to 1c29b3c Compare May 5, 2026 13:49
@EricPoul
Copy link
Copy Markdown
Contributor Author

EricPoul commented May 5, 2026

@codex review

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: 1c29b3c4d4

ℹ️ 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/mgidBidAdapter.js Outdated
Comment thread modules/mgidBidAdapter.js
@@ -135,10 +192,9 @@ export const spec = {
}
}
const acc = Number(bid.params.accountId);
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.

please type this similar to #14773

Comment thread modules/mgidBidAdapter.js
}
// backward compat: params.bcat/badv/wlang used to be supported directly; ortb2 takes priority
if (!isArray(request.bcat) || request.bcat.length === 0) {
const bcat = setOnAny(context.bidRequests, 'params.bcat');
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.

type this also

Comment thread modules/mgidBidAdapter.md
| ---- | ----- | ---- | ----------- | -------
| `accountId` | required | String | The account ID from Mgid | "123"
| `placementId` | required | String | The placement ID from Mgid | "123456"
| `accountId` | required | String | The account ID from Mgid | `123`
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.

your adapter refers to params not documented here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could you specify which one?

Copy link
Copy Markdown
Contributor Author

@EricPoul EricPoul May 5, 2026

Choose a reason for hiding this comment

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

Should I write each one that is used from params(even if just for backward compatibility)? @patmmccann

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.

at least define types for them, you can mark as deprecated in the type declaration

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.

Comment thread modules/mgidBidAdapter.js
if (!isNumber(deepAccess(request.device, 'pxratio'))) {
let topWindow;
try { topWindow = window.top; } catch (e) { topWindow = window; }
deepSetValue(request, 'device.pxratio', getDevicePixelRatio(topWindow));
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch from 1c29b3c to 6b66349 Compare May 5, 2026 14:31
@EricPoul EricPoul force-pushed the mgid-ortb-migration branch from 6b66349 to 2659ade Compare May 5, 2026 18:03
@patmmccann patmmccann merged commit 8e6fad4 into prebid:master May 5, 2026
102 checks passed
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