Skip to content

AdSmartx Bid Adapter : New Bidder Adapter#14559

Merged
patmmccann merged 22 commits intoprebid:masterfrom
smart-exchange-ai-digital:master
Apr 14, 2026
Merged

AdSmartx Bid Adapter : New Bidder Adapter#14559
patmmccann merged 22 commits intoprebid:masterfrom
smart-exchange-ai-digital:master

Conversation

@pritishmd-talentica
Copy link
Copy Markdown
Contributor

@pritishmd-talentica pritishmd-talentica commented Mar 6, 2026

Type of change

  • Bugfix

  • Feature

  • [ x] New bidder adapter

  • [ x] Updated bidder adapter RiseMediaTech 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

Added a bidder adapter for AdSmartX
Maintainer : prebid@aidigital.com

Sample Ad Unit : Banner

    var adUnits = [
        {
            code: 'test-banner-div',
            mediaTypes: {
                banner: {
                    sizes:[
                        [320,50]
                    ]
                }
            },
            bids:[
                {
                    bidder: 'adsmartx',
                    params: {
                        bidfloor: 0.001,        
                        testMode: 1,
                        sspId: 123456,
                        siteId: 987654,
                        sspUserId: 'u1234'
                    }
                }
            ]
        }
    ]

Sample Ad Unit : Video

    var videoAdUnit = [
        {
            code: 'adsmartx',
            mediaTypes: {
                video: {
                    playerSize: [640, 480],           // required
                    context: 'instream',
                    mimes: ['video/mp4','video/webm'],
                    minduration: 5,
                    maxduration: 30,
                    startdelay: 30,
                    maxseq: 2,
                    poddur: 30,
                    protocols: [1,3,4],
                }
            },
            bids:[
                {   
                    bidder: 'adsmartx',
                    params: {
                        bidfloor: 0.001,
                        testMode: 1,
                        sspId: 123456,
                        siteId: 987654,
                        sspUserId: 'u1234'
                    }
                }
            ]
        }
    ]

Other information

Documentation PR:
prebid/prebid.github.io#6467

Copilot AI review requested due to automatic review settings March 6, 2026 17:29
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: c4fe9eae4c

ℹ️ 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 libraries/adsmartxUtils/bidderUtils.js
Comment thread libraries/adsmartxUtils/bidderUtils.js
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 a new AdSmartX bidder adapter and introduces shared ORTB conversion/response/sync utilities, also refactoring the existing RiseMediaTech adapter to use those utilities.

Changes:

  • Added adsmartx bidder adapter (module + in-repo markdown doc).
  • Added shared helper library libraries/adsmartxUtils/bidderUtils.js (converter, request builder, response interpreter, user sync builder).
  • Updated/added unit tests for adsmartx and adjusted one RiseMediaTech response expectation.

Reviewed changes

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

Show a summary per file
File Description
modules/adsmartxBidAdapter.js New AdSmartX bidder adapter wired to shared bidderUtils helpers.
modules/adsmartxBidAdapter.md New adapter documentation (currently missing bid params table).
libraries/adsmartxUtils/bidderUtils.js New shared ORTB converter/request/response/sync helpers used by adapters.
modules/risemediatechBidAdapter.js Refactored to use adsmartxUtils helpers; behavior changes in consent mapping and user sync return.
test/spec/modules/adsmartxBidAdapter_spec.js New AdSmartX adapter tests (currently contains JS syntax errors).
test/spec/libraries/adsmartxUtils/bidderUtils_spec.js New unit tests for shared bidderUtils helpers.
test/spec/modules/risemediatechBidAdapter_spec.js Adjusted expectation for unknown mtype to default to banner.

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

Comment thread libraries/adsmartxUtils/bidderUtils.js
Comment thread libraries/adsmartxUtils/bidderUtils.js
Comment thread libraries/adsmartxUtils/bidderUtils.js
Comment thread modules/adsmartxBidAdapter.md
Comment thread modules/adsmartxBidAdapter.js
Comment thread libraries/adsmartxUtils/bidderUtils.js
Comment thread test/spec/modules/adsmartxBidAdapter_spec.js
Comment thread modules/risemediatechBidAdapter.js Outdated
Comment thread libraries/adsmartxUtils/bidderUtils.js Outdated
Comment thread test/spec/modules/adsmartxBidAdapter_spec.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!

  • libraries/adsmartxUtils/bidderUtils.js
  • modules/adsmartxBidAdapter.js

@pritishmd-talentica
Copy link
Copy Markdown
Contributor Author

Hi @jsnellbaker & @ncolletti ,
Can you please review

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 17, 2026

Coverage Report for CI Build 24393716418

Coverage increased (+0.01%) to 96.354%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (602 of 603 lines covered, 99.83%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
test/spec/modules/adsmartxBidAdapter_spec.js 347 346 99.71%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 227000
Covered Lines: 218724
Line Coverage: 96.35%
Relevant Branches: 52827
Covered Branches: 42902
Branch Coverage: 81.21%
Branches in Coverage %: No
Coverage Strength: 70.81 hits per line

💛 - Coveralls

@jsnellbaker
Copy link
Copy Markdown
Collaborator

@pritishmd-talentica I checked over the new adapter and it seems ok. I ran a test for it using the hello_world page and it returned a bid.

However when I double-checked the risemediatech bid adapter (since it was also updated), I saw the ad server request failed. Per the browser's console tab, the prebid debugger indicated the request timed out after 1000ms - so there was no response at all. Below are the request details.

Can you please take a look?

url:

https://dev-ads.risemediatech.com/ads/rtb/prebid/js

payload:

{"imp":[{"ext":{"data":{"adserver":{"name":"gam","adslot":"/19968336/header-bid-tag-0"}},"gpid":"/19968336/header-bid-tag-0"},"id":"1c47b367-d023-4ae0-be88-fb32a263d586","banner":{"topframe":1,"format":[{"w":320,"h":50}]},"secure":1,"bidfloor":0.001}],"site":{"domain":"test.localhost:9999","publisher":{"domain":"test.localhost:9999"},"page":"http://test.localhost:9999/integrationExamples/gpt/hello_world.html?pbjs_debug=true","ref":"http://test.localhost:9999/integrationExamples/gpt/hello_world.html?pbjs_debug=true"},"device":{"w":2560,"h":1440,"ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36","language":"en","ext":{"vpw":2560,"vph":711},"sua":{"source":1,"platform":{"brand":"macOS"},"browsers":[{"brand":"Chromium","version":["146"]},{"brand":"Not-A.Brand","version":["24"]},{"brand":"Google Chrome","version":["146"]}],"mobile":0}},"source":{"ext":{}},"id":"54ce0351-4c86-4100-b735-052b87010cff","test":0,"tmax":1000,"cur":["USD"],"ext":{"test":1}}

@pritishmd-talentica
Copy link
Copy Markdown
Contributor Author

@jsnellbaker We have discontinued the old adapter and we have no plans going forward to support or use it.

@pritishmd-talentica
Copy link
Copy Markdown
Contributor Author

@jsnellbaker if everything looks fine, can you approve

@jsnellbaker
Copy link
Copy Markdown
Collaborator

My concern is that some publishers will just auto-update and things will break for them. This PR (as is) would be included in a minor release of Prebid.js, so there's some level of expectation that adapters would continue to work if they were to do a minor release update.

I'm not sure about this approach of just letting it be potentially broken.

@patmmccann could you help take a look at the above?

@patmmccann
Copy link
Copy Markdown
Collaborator

is this pr actively breaking risemediatech? it works in master?

@pritishmd-talentica
Copy link
Copy Markdown
Contributor Author

@patmmccann , Risemediatech Adapter is not being used by any publishers as of now. Moreover, the ad server endpoint has been discontinued and hence even in Master branch, it will not work.

CC : @jsnellbaker

@pritishmd-talentica
Copy link
Copy Markdown
Contributor Author

@jsnellbaker @patmmccann Can you please review and approve

@patmmccann
Copy link
Copy Markdown
Collaborator

@patmmccann , Risemediatech Adapter is not being used by any publishers as of now. Moreover, the ad server endpoint has been discontinued and hence even in Master branch, it will not work.

CC : @jsnellbaker

If this is indeed dead can you have the adapter reflect that? It should simply print out a warning that it is dead and not try and make bid requests

* @param {Object} bid - The bid request object.
* @returns {boolean} True if the bid request is valid.
*/
const isBidRequestValid = (bid) => {
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.

i guess maybe if you just always return false and a logWarn here you will be good?

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.

I have done the needful. Please check

Comment thread modules/risemediatechBidAdapter.js Outdated
request.cur = [DEFAULT_CURRENCY];
request.tmax = bidderRequest.timeout;
request.test = bidderRequest.test || 0;
const isBidRequestValid = validateBidRequest;
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.

you said this is always false in the comments?

@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!

  • libraries/adsmartxUtils/bidderUtils.js
  • modules/adsmartxBidAdapter.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!

  • libraries/adsmartxUtils/bidderUtils.js
  • modules/adsmartxBidAdapter.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!

  • libraries/adsmartxUtils/bidderUtils.js
  • modules/adsmartxBidAdapter.js

@patmmccann patmmccann merged commit 6ee4c32 into prebid:master Apr 14, 2026
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants