New Adapter: Ezoic#4823
Conversation
|
Documentation PR: prebid/prebid.github.io#6614 |
Code coverage summaryNote:
ezoicRefer here for heat map coverage report |
| endpoint: "https://g.ezoic.net/ezoic/prebid/adapter/ortb" | ||
| maintainer: | ||
| email: prebid@ezoic.com | ||
| gvlVendorID: 347 |
| # Ezoic requires publisher domains to be registered and approved before | ||
| # bidding; unapproved inventory receives no-bid responses. Contact | ||
| # prebid@ezoic.com to get set up. | ||
| endpoint: "https://g.ezoic.net/ezoic/prebid/adapter/ortb" |
| # prebid@ezoic.com to get set up. | ||
| endpoint: "https://g.ezoic.net/ezoic/prebid/adapter/ortb" | ||
| maintainer: | ||
| email: prebid@ezoic.com |
There was a problem hiding this comment.
waiting for verification
There was a problem hiding this comment.
verification email has been sent
| func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { | ||
| body, err := jsonutil.Marshal(request) | ||
| if err != nil { | ||
| return nil, []error{fmt.Errorf("unable to marshal openrtb request: %v", err)} |
There was a problem hiding this comment.
Please use %w instead of %v here so the error is properly wrapped and can be inspected via errors.Is() / errors.As(). Other adapters in PBS consistently use %w for this pattern.
There was a problem hiding this comment.
Done in 477ec0a — switched to %w so the marshal error wraps properly for errors.Is()/errors.As().
| if buildErr != nil { | ||
| t.Fatalf("Builder returned unexpected error %v", buildErr) | ||
| } |
There was a problem hiding this comment.
The server config fields ExternalUrl, GvlID, and DataCenter can be removed — the Builder function does not use the server parameter at all, so these values have no effect on the test.
There was a problem hiding this comment.
Done in 477ec0a — the Builder ignores the server arg, so I replaced it with config.Server{}.
| @@ -0,0 +1,124 @@ | |||
| { | |||
There was a problem hiding this comment.
The adapter declares banner, video, and native support in the YAML, but the exemplary test directory only contains simple-banner.json. Please add simple-video.json and simple-native.json to ezoictest/exemplary/ to exercise the full mtype mapping end-to-end, not just in the unit test.
There was a problem hiding this comment.
Done in 477ec0a — added simple-video.json (mtype 2 → video) and simple-native.json (mtype 4 → native) to ezoictest/exemplary/ so all three advertised media types now have end-to-end round-trip coverage.
- Wrap marshal error with %w instead of %v so it can be inspected via errors.Is()/errors.As() - Drop unused config.Server fields (ExternalUrl, GvlID, DataCenter) from the JSON-samples test; Builder does not read the server parameter - Add simple-video.json and simple-native.json exemplary tests to exercise the video and native mtype mapping end-to-end, matching the advertised capabilities
|
Thanks for the thorough review, @przemkaczmarek! Pushed 477ec0a addressing all three points:
The maintainer-email verification has also been sent (replied on that thread). Re-requested review — thanks again! |



Overview
This PR adds a new bid adapter for Ezoic (https://www.ezoic.com), an ad monetization platform.
ezoichttps://g.ezoic.net/ezoic/prebid/adapter/ortb(global, HTTPS, keep-alive)Design notes
The adapter is a deliberately thin transport: it forwards the OpenRTB request unchanged to Ezoic's bidding endpoint and maps the OpenRTB response back, taking the media type from
bid.mtype. Eligibility, demand selection, and creative construction all happen server-side at Ezoic. No required bidder params (placementIdis optional); no bid mutation; no transaction ID creation/overwrites; all networking through the core framework.Registration required: Ezoic returns bids only for publisher domains that have been registered and approved. Requests for unapproved inventory receive a no-bid (HTTP 204) response. This is stated in the bidder-info yaml and in the documentation PR's Registration section.
Testing
simple-banner,simple-video,simple-native) plus supplemental (204 / 400 / 500 / invalid body / unsupported mtype) JSON tests, and unit tests for the builder, no-content handling, media type mapping, and params schema../validate.shpasses (full suite, fmt, vet).Manual end-to-end test (per the new-adapter checklist)
Built this branch and ran it locally against the live production endpoint:
"ezoic": {}andsite.page: prebid.org(not a registered domain): HTTP 200 auction response with noseatbid;ext.debug.httpcalls.ezoicshows the call tohttps://g.ezoic.net/ezoic/prebid/adapter/ortbreturning a clean 204 in ~150ms — the registration gate behaving as documented.mtype: 1, 300x250, ~11.5KB markup),responsetimemillis.ezoic45–56ms across warm repeats, a bid returned on every attempt.Documentation
Docs PR to prebid.github.io: prebid/prebid.github.io#6614