Skip to content

BidDigi Bid Adapter: new adapter - #15493

Open
Biddigi143 wants to merge 5 commits into
prebid:masterfrom
Biddigi143:biddigi-bidder-adapter
Open

BidDigi Bid Adapter: new adapter#15493
Biddigi143 wants to merge 5 commits into
prebid:masterfrom
Biddigi143:biddigi-bidder-adapter

Conversation

@Biddigi143

Copy link
Copy Markdown

Type of change

New bidder adapter.

Description of change

Adds the biddigi bidder adapter. BidDigi is a programmatic SSP with 380+ verified publishers across news, sports, entertainment, OTT and CTV. This adapter connects to BidDigi's own OpenRTB 2.5+ auction endpoint (a Cloudflare Worker running globally on Cloudflare's edge network), letting any Prebid.js publisher request bids from BidDigi's demand, not just BidDigi's own network.

Built on Prebid.js's shared ortbConverter library rather than a hand-rolled oRTB mapping. Supports banner, video (instream/outstream), and native. region is a closed enum (in/us), not an arbitrary publisher-suppliable URL, since letting bid params redirect traffic to any endpoint is a pattern this adapter intentionally avoids.

Maintainer contact email: kunal@biddigi.com

Test parameters for validating bids:

{
  bidder: 'biddigi',
  params: {
    placementId: 'placement-123',
    publisherId: 'publisher-abc'
  }
}

Docs PR: will be linked in a follow-up comment once opened on prebid/prebid.github.io.

Other information

Unit tests: 20 tests via the real gulp test-only (Karma/Chrome-headless/mocha/chai/sinon) harness, covering isBidRequestValid, oRTB request building for all 3 media types, region routing, bidfloor pass-through, GDPR/USP consent field mapping, debug-mode test:1, response interpretation, and getUserSyncs.

Also verified end-to-end: the compiled bundle runs a real headless-Chromium Prebid.js auction against a mocked BidDigi endpoint and wins correctly.

eslint passes clean against this repo's own config.

No gvlid yet - region only supports in/us today, so no EU/TCF traffic is served by this adapter yet; will register with IAB Europe if/when that changes.

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

Copy link
Copy Markdown

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: 874ff476fc

ℹ️ 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".

*/
interpretResponse: function (response, request) {
if (!response || !response.body) return [];
const bids = converter.fromORTB({ response: response.body, request: request.data }).bids;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Determine the media type for OpenRTB 2.5 responses

When the advertised OpenRTB 2.5 endpoint returns a legal bid without the 2.6-only seatbid.bid[].mtype field, the converter's default media-type processor throws Cannot determine mediaType for response; the converter then filters out that bid, so this method returns no bids. The tests mask this by adding mtype: 1. Supply the media type through converter context or a custom bid-response processor, using the matching request impression when it is unambiguous.

Useful? React with 👍 / 👎.

Comment thread modules/biddigiBidAdapter.js Outdated
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

/**
* @param {object} bid

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Export the BidDigi bidder parameter types

This new public adapter exposes placementId, publisherId, region, bidfloor, and bidfloorcur only through an untyped {object} bid, and no biddigiBidAdapter.d.ts augments BidderParams; consequently npm TypeScript consumers cannot discover or validate this adapter's configuration. Add and export a bidder-params type, register it in BidderParams, and reference it from the JS JSDoc.

AGENTS.md reference: AGENTS.md:L77-L77

Useful? React with 👍 / 👎.

@Biddigi143

Copy link
Copy Markdown
Author

Docs PR is now open: prebid/prebid.github.io#6708 (adds dev-docs/bidders/biddigi.md). Per that repo's own contribution guidance, I understand the docs PR merges after this code PR merges and a release goes out, so no action needed there until this one lands.

Also — thanks for the automated review. Two follow-ups on it:

  • The mtype concern: BidDigi's auction-service backend already defaults every bid to mtype: 1 (banner) when a connector's response doesn't supply one, so the converter always has a media type to work with. Not an issue in practice today, but a fair thing to flag for anyone extending this to non-banner connectors later.
  • The CORS/preflight concern is valid and I'm addressing it now (removing the explicit contentType: 'application/json' override, and adding proper CORS handling to the backend so cross-origin requests from arbitrary publisher pages aren't blocked). Will push a follow-up commit shortly.

@barecheck

barecheck Bot commented Aug 17, 2026

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 91.2%

Your code coverage diff: 0.01% ▴

Uncovered files and lines
FileLines
modules/biddigiBidAdapter.js75

…ATIVE

The "Unit tests (all features disabled)" CI job builds Prebid.js with NATIVE and VIDEO features compiled out, so libraries/ortbConverter's video/native imp processors don't run and imp.video / imp.native are legitimately undefined there. This adapter's own video/native imp assertions were unguarded, so they failed under that build even though the adapter itself is correct. Wrapped both in if (FEATURES.VIDEO) / if (FEATURES.NATIVE), matching the pattern used across the rest of this repo's adapter specs (e.g. pubmaticBidAdapter_spec.js, limelightDigitalBidAdapter_spec.js). Verified locally against both gulp test-only (20/20) and gulp test-all-features-disabled (18/18, the 2 guarded tests correctly skip).
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.

1 participant