HyperBrainz Bid Adapter: new adapter
Type of change
- [x] New bidder adapter
Description of change
Adds the HyperBrainz Bid Adapter, connecting to the HyperBrainz Ad Exchange as a demand source over OpenRTB 2.5. Supports banner, video (instream + outstream), and native media types.
Highlights:
- Sends ORTB native requests via
nativeOrtbRequestand parses native responses into the standard Prebidnative.ortbshape - Reads first-party data from
bidderRequest.ortb2, EIDs fromuserIdAsEids, supply chain fromortb2.source.ext.schain, and price floors via the floors module (getFloor()) - Forwards GDPR/TCF, CCPA/USP, GPP and COPPA signals
- Outstream video renders via a publisher-provided renderer (documented in the adapter
.md) - Implements user syncs (iframe/pixel) and bid lifecycle handlers (
onBidWon,onTimeout,onSetTargeting)
Testing:
gulp lintpasses with no output- Adapter unit tests pass (41 cases):
gulp test --file test/spec/modules/hyperbrainzBidAdapter_spec.js - Verified end-to-end against the live endpoint: banner renders, native returns
native.ortb, and video returns valid VAST (all at cpm 2.5)
Maintainer contact: [email protected]
Test parameters for validating bids:
var adUnits = [
{
code: 'test-banner',
mediaTypes: { banner: { sizes: [[300, 250], [728, 90]] } },
bids: [{ bidder: 'hyperbrainz', params: { placementId: 'hb_test_banner', bidFloor: 0.30 } }]
},
{
code: 'test-video',
mediaTypes: { video: { context: 'outstream', playerSize: [640, 360], mimes: ['video/mp4'] } },
bids: [{ bidder: 'hyperbrainz', params: { placementId: 'hb_test_video' } }]
},
{
code: 'test-native',
mediaTypes: { native: { ortb: { assets: [
{ id: 1, title: { len: 80 }, required: 1 },
{ id: 2, img: { type: 3, w: 1200, h: 627 }, required: 1 },
{ id: 3, data: { type: 1 } }
] } } },
bids: [{ bidder: 'hyperbrainz', params: { placementId: 'hb_test_native' } }]
}
];
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
modules/hyperbrainzBidAdapter.js
Hi @jefftmahoney — just checking in on this PR, it's been about 3 weeks since it was assigned for review. I've also just synced the branch with the latest master to keep it up to date and CI is passing (3/3 checks). Let me know if there's anything I can adjust or if it'd help to loop in another reviewer. Happy to make any changes needed!
Hi @krishnarx - sorry for the delay. I will take a look at this.
This PR includes an adapter whose code does not match its file name. Bid adapter modules should be named <bidderCode>BidAdapter, userId <userIdCode>IdSystem, RTD <rtdCode>RtdProvider, and analytics <analyticsCode>AnalyticsAdapter.
This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:
- Changes to
modules/hyperbrainzBidAdapter.jsmay need:es.array.pushes.iterator.constructores.iterator.findes.iterator.for-eaches.iterator.mapes.json.stringifyesnext.iterator.constructoresnext.iterator.findesnext.iterator.for-eachesnext.iterator.mapesnext.json.parse
- Changes to
test/spec/modules/hyperbrainzBidAdapter_spec.jsmay need:es.array.withes.json.stringifyesnext.array.withesnext.json.parse
The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
modules/hyperbrainzBidAdapter.js
LGTM
Thanks for the approval!
Barecheck - Code coverage report
Total: 96.58%Your code coverage diff: -0.01% ▾
Hi @krishnarx
The bidder code hyperbrainz in this bidder adaptor is in use as an alias in adkernelBidAdapter.js since may of 2024 (https://github.com/prebid/Prebid.js/pull/11544)
I need confirmation from your team that I can safely remove it from our bidder adapter without any negative impact on your business.
Hi @krishnarx
The bidder code
hyperbrainzin this bidder adaptor is in use as an alias in adkernelBidAdapter.js since may of 2024 (#11544)I need confirmation from your team that I can safely remove it from our bidder adapter without any negative impact on your business.
Hi @ckbo3hrk — confirmed on our end, that legacy hyperbrainz alias in adkernelBidAdapter.js is dead and carries no live traffic. Please go ahead and remove it — no impact to us. Thanks for flagging it!