Skip to content

deepintent bid adapter: adds badv and bcat support#14528

Merged
patmmccann merged 4 commits intoprebid:masterfrom
parthshah51999:master
Mar 12, 2026
Merged

deepintent bid adapter: adds badv and bcat support#14528
patmmccann merged 4 commits intoprebid:masterfrom
parthshah51999:master

Conversation

@parthshah51999
Copy link
Copy Markdown
Contributor

@parthshah51999 parthshah51999 commented Feb 27, 2026

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated 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 badv and bact support for deepintent's bid adapter

Other information

Copilot AI review requested due to automatic review settings February 27, 2026 13:54
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: 3bfaaa8f81

ℹ️ 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/deepintentBidAdapter.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

This PR adds support for OpenRTB blocking parameters (bcat and badv) to the deepintent bid adapter. These parameters allow publishers to specify blocked advertiser categories and blocked advertiser domains, providing better control over ad content. The implementation follows the established pattern in the codebase of prioritizing ortb2 values over params with a fallback mechanism.

Changes:

  • Added bcat and badv extraction from bidderRequest.ortb2 with fallback to params
  • Added validation to ensure values are arrays with at least one element before including them
  • Added comprehensive test coverage for the new functionality

Reviewed changes

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

File Description
modules/deepintentBidAdapter.js Implements bcat/badv extraction logic with ortb2 priority and params fallback, includes proper array validation
test/spec/modules/deepintentBidAdapter_spec.js Adds test suite covering ortb2 usage, missing values, and params fallback scenarios
Comments suppressed due to low confidence (1)

test/spec/modules/deepintentBidAdapter_spec.js:442

  • The test coverage for bcat/badv is good, but it would be beneficial to add a test case that verifies the priority when both ortb2 and params contain bcat/badv values. This would explicitly document that ortb2 takes precedence over params, which is the expected behavior based on the implementation.
  describe('ortb2 blocking (bcat, badv)', function() {
    it('should add bcat and badv to payload when bidderRequest.ortb2 has them', function() {
      const bidderReq = {
        ortb2: {
          bcat: ['IAB1', 'IAB2'],
          badv: ['example.com']
        }
      };
      const bRequest = spec.buildRequests(request, bidderReq);
      const data = JSON.parse(bRequest.data);
      expect(data.bcat).to.deep.equal(['IAB1', 'IAB2']);
      expect(data.badv).to.deep.equal(['example.com']);
    });
    it('should not add bcat or badv when bidderRequest.ortb2 does not have them', function() {
      const bidderReq = {ortb2: {}};
      const bRequest = spec.buildRequests(request, bidderReq);
      const data = JSON.parse(bRequest.data);
      expect(data.bcat).to.be.undefined;
      expect(data.badv).to.be.undefined;
    });
    it('should use params.bcat and params.badv as fallback when ortb2 does not set them', function() {
      const requestWithParams = [{
        bidder: 'deepintent',
        bidId: 'test-bid-id',
        mediaTypes: { banner: { sizes: [[300, 250]] } },
        params: {
          tagId: '100013',
          bcat: ['IAB25'],
          badv: ['blocked-advertiser.com']
        }
      }];
      const bRequest = spec.buildRequests(requestWithParams);
      const data = JSON.parse(bRequest.data);
      expect(data.bcat).to.deep.equal(['IAB25']);
      expect(data.badv).to.deep.equal(['blocked-advertiser.com']);
    });
  });

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

@patmmccann patmmccann changed the title adds badv and bcat support for deepintent bid adapter deepintent bid adapter: adds badv and bcat support Feb 27, 2026
@patmmccann
Copy link
Copy Markdown
Collaborator

please repull master after #14529 merges in

@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 22512421802

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 2 files are covered.
  • 46 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+33.2%) to 96.325%

Files with Coverage Reduction New Missed Lines %
src/adloader.js 9 76.92%
src/utils.js 37 90.51%
Totals Coverage Status
Change from base Build #3: 33.2%
Covered Lines: 217343
Relevant Lines: 225635

💛 - Coveralls

@parthshah51999
Copy link
Copy Markdown
Contributor Author

@gwhigs checking in here if there is anything blocking this review or any updates are needed before this can be picked for review - happy to get them integrated to move this along

@patmmccann patmmccann merged commit bd487f3 into prebid:master Mar 12, 2026
102 checks passed
mike-lei pushed a commit to wishabi/Prebid.js that referenced this pull request Apr 21, 2026
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.

4 participants