Skip to content

AdSmartx Bid Adapter : New Bidder Adapter#14559

Open
pritishmd-talentica wants to merge 16 commits intoprebid:masterfrom
smart-exchange-ai-digital:master
Open

AdSmartx Bid Adapter : New Bidder Adapter#14559
pritishmd-talentica wants to merge 16 commits intoprebid:masterfrom
smart-exchange-ai-digital:master

Conversation

@pritishmd-talentica
Copy link
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

@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".

Copy link
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.

@github-actions
Copy link

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
Contributor Author

Hi @jsnellbaker & @ncolletti ,
Can you please review

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 23180858414

Details

  • 587 of 588 (99.83%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 96.355%

Changes Missing Coverage Covered Lines Changed/Added Lines %
test/spec/modules/adsmartxBidAdapter_spec.js 346 347 99.71%
Files with Coverage Reduction New Missed Lines %
modules/videoModule/coreVideo.js 1 74.29%
Totals Coverage Status
Change from base Build 23109247465: 0.01%
Covered Lines: 216134
Relevant Lines: 224311

💛 - Coveralls

@jsnellbaker
Copy link
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
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
Contributor Author

@jsnellbaker if everything looks fine, can you approve

@jsnellbaker
Copy link
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
Collaborator

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

@pritishmd-talentica
Copy link
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

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