KEMBAR78
Alvads Bid Adapter : initial release by SamuelAlejandroNT · Pull Request #13799 · prebid/Prebid.js · GitHub
Skip to content

Conversation

@SamuelAlejandroNT
Copy link
Contributor

@SamuelAlejandroNT SamuelAlejandroNT commented Aug 25, 2025

alvadsBidAdapter: support OpenRTB 2.5 POST requests with banner & video
Documentation PR: prebid/prebid.github.io#6231

Overview

Module Name: alvadsBidAdapter
Module Type: bidder
Maintainer: alvads@oyealva.com

Type of Change

  • New bidder adapter
  • Feature
  • Bugfix
  • Refactoring / code style / build / CI

Description

The Alva Bid Adapter allows publishers to connect their banner and video inventory with the Alva demand platform.

  • Bidder Code: alvads
  • Supported Media Types: banner, video
  • Protocols: OpenRTB 2.5 via POST for both banner and video
  • Dynamic Endpoints: The adapter can use a default endpoint or a custom endpoint provided in the bid params.

Test Parameters

Banner Example

var adUnits = [{
    code: 'div-banner',
    mediaTypes: {
        banner: {
            sizes: [[300, 250], [320, 100]]
        }
    },
    bids: [{
        bidder: 'alvads',
        params: {
            publisherId: 'pub-123',    // required
            tagid: 'tag-456',           // required for banner
            bidfloor: 0.50,             // optional
            userId: '+59165352182',     // optional
            endpoint: 'https://custom-endpoint.com/openrtb' // optional, overrides default
        }
    }]
}];

Video Example

var adUnits = [{
    code: 'video-ad',
    mediaTypes: {
        video: {
            context: 'instream',
            playerSize: [[640, 360]]
        }
    },
    bids: [{
        bidder: 'alvads',
        params: {
            publisherId: 'pub-123',     // required
            bidfloor: 0.5,              // optional
            userId: '+59165352182',     // optional
            endpoint: 'https://custom-endpoint.com/video' // optional, overrides default
        }
    }]
}];

Request Information

Banner / Video

  • Endpoint:
    https://helios-ads-qa-core.ssidevops.com/decision/openrtb
    
  • Method: POST
  • Payload: OpenRTB 2.5 request containing site, device, user, regs, imp.
  • Dynamic Endpoint: The request URL can be overridden by bid.params.endpoint.

Response Information

Banner

The response is standard OpenRTB with seatbid. Example:

{
  "id": "response-id",
  "seatbid": [{
    "bid": [{
      "impid": "imp-123",
      "price": 0.50,
      "adm": "<div>Creative</div>",   
      "crid": "creative-1",
      "w": 320,
      "h": 100,
      "ext": {
        "vast_url": "http://example.com/vast.xml" 
      },
      "adomain": ["example.com"]       
    }]
  }],
  "cur": "USD"
}

Interpretation:

If adm contains , the adapter sets mediaType: 'video' and includes vastXml & vastUrl.

Otherwise, mediaType: 'banner' and ad contains the HTML.

Additional Details

  • Defaults:

    • netRevenue = true
    • ttl = 300
    • Banner fallback size: 320x100
    • Video fallback size: 1280x720
  • Callbacks:

    • onTimeout → logs timeout events
    • onBidWon → logs winning bid

Samuel Alejandro Maldonado Garcia and others added 4 commits August 25, 2025 11:49
- Implement alvadsBidAdapter module supporting OpenRTB 2.5 POST requests
- Supports dynamic endpoints via bid params or default endpoint
- Handles banner and video media types with fallback sizes
- Parses responses to set mediaType and extract vastXml/vastUrl for video
- Includes example test parameters for banner and video
- Default netRevenue: true, TTL: 300
- Callback support for onTimeout and onBidWon
@SamuelAlejandroNT
Copy link
Contributor Author

Hi, I noticed that the failing tests don’t seem related to this adapter. Could it be that they are flaky in CI (since window.pbjs sometimes shows as undefined)?

All unit tests for alvadsBidAdapter are passing locally. Just wanted to check if this is expected or if I should re-run the workflow.

@SamuelAlejandroNT SamuelAlejandroNT changed the title Add AlvaDS Bid Adapter for banner and video Add alvads Bid Adapter for banner and video Aug 25, 2025
Samuel Alejandro Maldonado Garcia and others added 2 commits August 27, 2025 08:27
@SamuelAlejandroNT
Copy link
Contributor Author

Hi, tests are passing. Waiting for workflow approval from a maintainer.

@ChrisHuie ChrisHuie changed the title Add alvads Bid Adapter for banner and video Alvads Bid Adapter : initial release Aug 27, 2025
@github-actions
Copy link

github-actions bot commented Sep 4, 2025

Tread carefully! This PR adds 1 linter error (possibly disabled through directives):

  • modules/alvadsBidAdapter.js (+1 error)

Copy link
Collaborator

@osazos osazos left a comment

Choose a reason for hiding this comment

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

Please link your prebid.github.io PR.

Samuel Alejandro Maldonado Garcia and others added 2 commits September 11, 2025 09:57
Copy link
Collaborator

@osazos osazos left a comment

Choose a reason for hiding this comment

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

Thx for the update.

After reading it again:

  • I opened two new threads
  • I also missed asking you to move your test file into test/spec/modules/

It should be good after that.

@SamuelAlejandroNT
Copy link
Contributor Author

@osazos, thanks for the feedback

@osazos
Copy link
Collaborator

osazos commented Sep 26, 2025

LGTM

@osazos osazos self-requested a review September 26, 2025 14:32
@osazos osazos merged commit 6893a03 into prebid:master Sep 29, 2025
18 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.

3 participants