Skip to content

Asterio Bid Adapter: add initial bidder adapter#14691

Merged
patmmccann merged 5 commits into
prebid:masterfrom
asteriosoft:master
Apr 30, 2026
Merged

Asterio Bid Adapter: add initial bidder adapter#14691
patmmccann merged 5 commits into
prebid:masterfrom
asteriosoft:master

Conversation

@mihanikw2g
Copy link
Copy Markdown
Contributor

@mihanikw2g mihanikw2g commented Apr 9, 2026

Type of change

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

Description of change

Adds the initial asterio bidder adapter for Prebid.js.

Features included:

  • banner and video support
  • adUnitToken bidder param
  • bidder documentation
  • unit tests

Maintainer contact:

Test parameters:

const adUnits = [
  {
    code: 'test-banner',
    mediaTypes: {
      banner: {
        sizes: [[300, 250]]
      }
    },
    bids: [
      {
        bidder: 'asterio',
        params: {
          adUnitToken: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
        }
      }
    ]
  }
];

Other information

Related docs PR: prebid/prebid.github.io#6521

Copilot AI review requested due to automatic review settings April 9, 2026 06:04
@review-assignment-bot review-assignment-bot Bot requested a review from lksharma April 9, 2026 06:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

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/asterioBidAdapter.js

Comment thread modules/asterioBidAdapter.js Fixed
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: f1c2864ffb

ℹ️ 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/asterioBidAdapter.js Outdated
Comment thread modules/asterioBidAdapter.js Outdated
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

Adds the initial asterio bidder adapter to Prebid.js, including adapter implementation, documentation, and unit tests.

Changes:

  • Introduces modules/asterioBidAdapter.js with request building, response interpretation for banner/video, and win tracking.
  • Adds modules/asterioBidAdapter.md bidder documentation and example configuration.
  • Adds test/spec/modules/asterioBidAdapter_spec.js unit tests for request/response mapping and win tracking.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
modules/asterioBidAdapter.js New bidder adapter implementing validation, request building, response mapping, and win tracking.
modules/asterioBidAdapter.md Initial bidder documentation and test parameters for publishers.
test/spec/modules/asterioBidAdapter_spec.js Unit tests covering adapter validation, request construction, response interpretation, and win tracking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/asterioBidAdapter.js Outdated
Comment on lines +89 to +114
describe('buildRequests', function () {
it('should create a POST request to the direct prebid endpoint', function () {
const bidderRequest = spec.buildRequests([REQUEST], {
bidderRequestId: '123',
gdprConsent: {
gdprApplies: true,
consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A=='
},
refererInfo: {
page: 'http://test.com/path.html'
}
});

expect(bidderRequest.method).to.equal('POST');
expect(bidderRequest.url).to.equal(ENDPOINT);
expect(bidderRequest.options.customHeaders).to.deep.equal({ 'Rtb-Direct': true });
expect(bidderRequest.options.contentType).to.equal('application/json');
expect(bidderRequest.data.requestId).to.equal('123');
expect(bidderRequest.data.referer).to.equal('http://test.com/path.html');
expect(bidderRequest.data.schain).to.deep.equal(REQUEST.ortb2.source.ext.schain);
expect(bidderRequest.data.bids).to.deep.equal([{
bidId: '456',
adUnitToken: 'bbd6b4a6-66b8-479d-9527-e17899544693',
pos: 1,
sizes: [{ width: 300, height: 250 }, { width: 300, height: 600 }]
}]);
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The buildRequests tests only cover bidRequest.sizes as an array of tuples (banner-style). Since the adapter advertises video support and video playerSize can be provided as [w, h] (non-nested), add a unit test that exercises buildRequests for a video adUnit with sizes: [640, 360] (or mediaTypes.video.playerSize: [640, 360]) to ensure size normalization produces a single {width: 640, height: 360} entry.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +27
# Test Parameters
```
const adUnits = [
{
bids: [
{
bidder: 'asterio',
params: {
adUnitToken: '????????-????-????-????-????????????', // adUnitToken provided by Asterio
}
}
]
}
];
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The adapter implementation supports additional bidder params beyond adUnitToken (e.g., pos and an endpoint override), but the module docs only mention adUnitToken. Please document the full set of supported params (required vs optional), and if endpoint override is intended only for testing, explicitly call that out to avoid production misconfiguration.

Copilot uses AI. Check for mistakes.
@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 24175209834

Coverage increased (+0.001%) to 96.343%

Details

  • Coverage increased (+0.001%) from the base build.
  • Patch coverage: 95 of 95 lines across 2 files are fully covered (100%).
  • 3 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
modules/widespaceBidAdapter.js 2 83.67%
modules/browsiAnalyticsAdapter.js 1 92.31%

Coverage Stats

Coverage Status
Relevant Lines: 225041
Covered Lines: 216811
Line Coverage: 96.34%
Relevant Branches: 52503
Covered Branches: 42631
Branch Coverage: 81.2%
Branches in Coverage %: No
Coverage Strength: 72.97 hits per line

💛 - Coveralls

@github-actions
Copy link
Copy Markdown

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/asterioBidAdapter.js

@github-actions
Copy link
Copy Markdown

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/asterioBidAdapter.js

buildRequests: function (validBidRequests, bidderRequest) {
const bids = validBidRequests.map(bidRequest => ({
bidId: bidRequest.bidId,
adUnitToken: bidRequest.params.adUnitToken,
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 define or import type definitions on your bidder params, eg #14773

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.

Adapter has been migrated to TypeScript

@patmmccann patmmccann merged commit c6dfff6 into prebid:master Apr 30, 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.

6 participants