HyperBrainz Bid Adapter: new adapter - #15405
Conversation
…onsent, remove navigator access, add onBidBillable handler
…perbrainz/Prebid.js into hyperbrainz-bid-adapter-agent
|
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!
|
|
This PR includes an adapter whose code does not match its file name. Bid adapter modules should be named |
|
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:
The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3096095243
ℹ️ 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".
| function buildSource(bidderRequest) { | ||
| return { | ||
| fd: 1, | ||
| tid: bidderRequest?.ortb2?.source?.tid || generateUUID(), |
There was a problem hiding this comment.
Respect enableTIDs before adding source.tid
When publishers leave enableTIDs at its default false, Prebid redacts ortb2.source.tid before adapter code runs; this fallback immediately generates a new source.tid anyway, so every HyperBrainz request still transmits a bidder-created auction transaction ID despite the privacy control. The repo-enforced module rules prohibit bidder-created TIDs, so omit source.tid unless Prebid supplied one.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| export const spec = { | ||
| code: BIDDER_CODE, |
There was a problem hiding this comment.
Remove stale HyperBrainz alias before registering code
When a build includes both adkernelBidAdapter and this new adapter, modules/adkernelBidAdapter.js still registers { code: 'hyperbrainz' } as an alias of adkernel; registering this spec under the same bidder code leaves aliasRegistry.hyperbrainz resolving to Adkernel and can also let import order decide which adapter owns bidderRegistry.hyperbrainz, so HyperBrainz bids can be routed or attributed incorrectly. Remove the old alias before adding this bidder code.
Useful? React with 👍 / 👎.
| const map = {}; | ||
|
|
||
| validBids.forEach((bid) => { | ||
| const ep = bid.params.endpoint || defaultEndpoint; |
There was a problem hiding this comment.
Constrain custom endpoints to HyperBrainz domains
Because this accepts bid.params.endpoint verbatim, any page config can make the adapter POST the full auction payload, consent strings, EIDs, and first-party data to an arbitrary URL; the repo asks reviews to enforce the module rule that endpoint domains cannot be fully variable. Please restrict overrides to approved HyperBrainz hosts or remove the per-bid endpoint override.
Useful? React with 👍 / 👎.
|
You need to also commit a d.ts file or convert your Js to ts. Also modify adkernal to remove the alias |
|
Hi @ckbo3hrk — following up on the alias question from #15137. Since we confirmed the hyperbrainz alias in adkernelBidAdapter.js is unused on our side and safe to remove, could you go ahead and remove it? Patrick has flagged this as a blocker for getting our new adapter (#15405) merged. Let me know once it's done or if you need anything else from us. |
|
@krishnarx the alias is fixed, we still need types on your params eg #14918 |
Type of change
Description of change
Resubmission of #15137, which was merged and then reverted in #15401
due to a build failure also fixed a bug where the adapter incorrectly used
the win-notification URL (nurl) as the video ad source instead of the
actual VAST content (adm/vastXml). This was causing video ads to fail
with a "no MediaFile URL found" error even on valid bids.
The Adkernel alias conflict raised in #15137 has also been discussed
with @ckbo3hrk (see #11544 / #15137) — the hyperbrainz alias in
adkernelBidAdapter.js is unused on our side and confirmed safe to
remove.
Other information
Related docs PR: prebid/prebid.github.io#6632
Maintainer contact: it@hyperbrainz.com
Test parameters for validating bids: