Skip to content

New adapter: BeOp#4660

Merged
bsardo merged 18 commits intoprebid:masterfrom
BeOpinion:master
Mar 3, 2026
Merged

New adapter: BeOp#4660
bsardo merged 18 commits intoprebid:masterfrom
BeOpinion:master

Conversation

@jeans11
Copy link
Copy Markdown
Contributor

@jeans11 jeans11 commented Jan 14, 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

Documention PR: prebid/prebid.github.io#6432

Comment thread adapters/beop/beop.go Outdated
continue
}
bidResponseFinal.Bids = append(bidResponseFinal.Bids, &adapters.TypedBid{
Bid: &bid,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Found incorrect assignment made to Bid. bid variable receives a new value in each iteration of range loop. Assigning the address of bid (&bid) to Bid will result in a pointer that always points to the same memory address with the value of the last iteration. This can lead to unexpected behavior or incorrect results. Refer https://go.dev/play/p/9ZS1f-5h4qS
Consider using an index variable in the seatBids.Bid loop as shown below

  for _, seatBid := range response.SeatBid {
    for i := range seatBids.Bid {
      ...
      responseBid := &adapters.TypedBid{
        Bid: &seatBids.Bid[i],
        ...
      }
      ...
      ...
    }
  }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please take a look at this comment

Comment thread adapters/beop/beop.go Outdated
var bidExt openrtb_ext.ExtBid
err := jsonutil.Unmarshal(bid.Ext, &bidExt)
if err == nil && bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, d49baa1

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:54:	buildEndpointURL	91.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:75:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:113:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:127:	MakeBids		86.4%
total:								(statements)		83.6%

@bsardo bsardo added the adapter label Jan 20, 2026
@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 49abbe9

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:54:	buildEndpointURL	91.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:75:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:113:	getMediaTypeForBid	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:131:	MakeBids		87.0%
total:								(statements)		81.7%

@sebrobert
Copy link
Copy Markdown

Hello @bsardo, hope you are good 🙏
Can we have an update on that PR and have an approximative date of availability for our customers that are expecting it ?
In advance, thanks
Best

@karwaankit32
Copy link
Copy Markdown
Contributor

Can you please create a documentation PR and link it in the description?

Comment thread static/bidder-info/beop.yaml
@bsardo bsardo mentioned this pull request Feb 3, 2026
@@ -0,0 +1,33 @@
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not see tests related to the bidder params. Can you please add that under beop adapters folder with file name params_test.go?

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.

Did you want a test with missing param for example?

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi, what i meant was adding tests for valid and invalid params in a dedicated file adapters/beop/params_test.go

Please take a look at example - https://github.com/prebid/prebid-server/blob/master/adapters/adverxo/params_test.go

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.

Oh! Sorry for the misunderstanfing: ae27191

Comment thread adapters/beop/beop.go Outdated
Message: "ext.bidder not provided",
}
}
if beopExt.BeopPublisherID == "" && beopExt.BeopNetworkID == "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if we need this validation since if the param validation fails, it the adapter will never be called. In the bidder params configuration, we have already provided that either pid or nid, ntpnid needs to be provided

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.

Oh I didn't know that, so yeah we don't need extra validation.

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.

Comment thread adapters/beop/beop.go Outdated
continue
}
bidResponseFinal.Bids = append(bidResponseFinal.Bids, &adapters.TypedBid{
Bid: &bid,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please take a look at this comment

Comment thread adapters/beop/beop.go
}
}
var beopExt openrtb_ext.ExtImpBeop
if err := jsonutil.Unmarshal(bidderExt.Bidder, &beopExt); err != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can add coverage for unmarshalling errors in this code path

Comment thread adapters/beop/beop.go Outdated
url, err := url.Parse(a.endpoint)
if err != nil {
return "", &errortypes.Warning{
Message: "Failed to parse endpoint",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to do this validation since endpoint is supplanted from the config by Prebid ?

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.

Comment thread adapters/beop/beop.go Outdated
case openrtb2.MarkupVideo:
bidType = openrtb_ext.BidTypeVideo
case openrtb2.MarkupAudio:
bidType = openrtb_ext.BidTypeAudio
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add coverage for BidType - Audio, MarkupNative and invalid type

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.

Since the beop.yaml allow only banner and video I will remove the extra cases.

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.

Comment thread adapters/beop/beop.go
@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 7908799

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:54:	buildEndpointURL	91.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:75:	MakeRequests		81.2%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:113:	getMediaTypeForBid	66.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:131:	MakeBids		87.0%
total:								(statements)		81.7%

@sebrobert
Copy link
Copy Markdown

Please find here the DOC PR : prebid/prebid.github.io#6432

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, a5cb34d

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	85.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:65:	MakeRequests		87.5%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:103:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:117:	MakeBids		96.0%
total:								(statements)		94.0%

Comment thread adapters/beop/beop.go
responseData *adapters.ResponseData) (
*adapters.BidderResponse, []error,
) {
if responseData.StatusCode == http.StatusNoContent {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing test case

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.

endpoint: "https://hb.collectiveaudience.co/rtb/bid"
endpointCompression: gzip
maintainer:
email: tech@collectiveaudience.co
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sent a verification mail on this mailbox. Please acknowledge over the mailbox with "received"

Thanks

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 963f154

beop

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/beop/beop.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:33:	getRequestExtImpBeop	85.7%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:65:	MakeRequests		87.5%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:103:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/beop/beop.go:117:	MakeBids		100.0%
total:								(statements)		95.5%

Copy link
Copy Markdown
Contributor

@karwaankit32 karwaankit32 left a comment

Choose a reason for hiding this comment

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

Acknowledging that i received a reply over the mailbox

@sebrobert
Copy link
Copy Markdown

Hello @bsardo and @danylo-kazymyrov-teqblaze , hope you had a wonderful weekend.
Can we have your attention on that PR, and request for a final review/approval to plan this adapter to be live in a near future for our customers ?
In advance, thanks

@bsardo bsardo assigned karwaankit32 and unassigned bsardo Mar 3, 2026
endpointCompression: gzip
maintainer:
email: tech@collectiveaudience.co
gvlVendorID: 666
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.

Verified the ID

curl https://vendor-list.consensu.org/v3/vendor-list.json | jq '.vendors."666"'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  823k  100  823k    0     0  1940k      0 --:--:-- --:--:-- --:--:-- 1936k
{
  "id": 666,
  "name": "BeOp",
  "purposes": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8
  ],
  "legIntPurposes": [
    9,
    10,
    11
  ],
  "flexiblePurposes": [
    2,
    7,
    8,
    9,
    10,
    11
  ],
  "specialPurposes": [
    1,
    2,
    3
  ],
  "features": [
    3
  ],
  "specialFeatures": [],
  "cookieMaxAgeSeconds": 31556952,
  "usesCookies": true,
  "cookieRefresh": true,
  "urls": [
    {
      "langId": "en",
      "privacy": "https://beop.collectiveaudience.co/privacy-policy",
      "legIntClaim": "https://beop.collectiveaudience.co/privacy-policy"
    },
    {
      "langId": "fr",
      "privacy": "https://beop.collectiveaudience.co/fr/privacy-policy",
      "legIntClaim": "https://beop.collectiveaudience.co/fr/privacy-policy"
    }
  ],
  "usesNonCookieAccess": true,
  "dataRetention": {
    "stdRetention": 31,
    "purposes": {
      "7": 1000,
      "8": 1000,
      "9": 1000,
      "10": 1000,
      "11": 1000
    },
    "specialPurposes": {}
  },
  "dataDeclaration": [
    1,
    2,
    3,
    5,
    6,
    7,
    8,
    10,
    11
  ],
  "deviceStorageDisclosureUrl": "https://beop.io/deviceStorage.json"
}

@bsardo bsardo merged commit 15b40f3 into prebid:master Mar 3, 2026
6 checks passed
t-sormonte pushed a commit to Viously/prebid-server-go that referenced this pull request Mar 20, 2026
anthonyrichir pushed a commit to proxistore/prebid-server that referenced this pull request Mar 26, 2026
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.

5 participants