Skip to content

New Adapter: Ezoic#4823

Open
austinbyron wants to merge 3 commits into
prebid:masterfrom
ezoic:new-adapter-ezoic
Open

New Adapter: Ezoic#4823
austinbyron wants to merge 3 commits into
prebid:masterfrom
ezoic:new-adapter-ezoic

Conversation

@austinbyron

@austinbyron austinbyron commented Jun 11, 2026

Copy link
Copy Markdown

Overview

This PR adds a new bid adapter for Ezoic (https://www.ezoic.com), an ad monetization platform.

  • Bidder code: ezoic
  • Maintainer: prebid@ezoic.com
  • GVL Vendor ID: 347
  • Endpoint: https://g.ezoic.net/ezoic/prebid/adapter/ortb (global, HTTPS, keep-alive)
  • OpenRTB: 2.6 declared in bidder-info
  • Capabilities: site + app, banner / video / native

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 (placementId is 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

  • Exemplary tests for all three advertised media types (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.sh passes (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:

  1. The doc's banner request template with "ezoic": {} and site.page: prebid.org (not a registered domain): HTTP 200 auction response with no seatbid; ext.debug.httpcalls.ezoic shows the call to https://g.ezoic.net/ezoic/prebid/adapter/ortb returning a clean 204 in ~150ms — the registration gate behaving as documented.
  2. The same request shape for a registered test domain: valid banner bid (price 20.0, mtype: 1, 300x250, ~11.5KB markup), responsetimemillis.ezoic 45–56ms across warm repeats, a bid returned on every attempt.

Documentation

Docs PR to prebid.github.io: prebid/prebid.github.io#6614

@austinbyron

Copy link
Copy Markdown
Author

Documentation PR: prebid/prebid.github.io#6614

@ChrisHuie ChrisHuie requested a review from przemkaczmarek June 26, 2026 16:34
@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, 5127e7f

ezoic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/ezoic/ezoic.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v4/adapters/ezoic/ezoic.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v4/adapters/ezoic/ezoic.go:47:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/ezoic/ezoic.go:82:	getMediaTypeForBid	100.0%
total:								(statements)		96.9%

endpoint: "https://g.ezoic.net/ezoic/prebid/adapter/ortb"
maintainer:
email: prebid@ezoic.com
gvlVendorID: 347

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:

Image

# 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"

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.

endpoint works:

Image

# prebid@ezoic.com to get set up.
endpoint: "https://g.ezoic.net/ezoic/prebid/adapter/ortb"
maintainer:
email: prebid@ezoic.com

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.

waiting for verification

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

verification email has been sent

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.

verifie

Image

Comment thread adapters/ezoic/ezoic.go Outdated
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)}

@przemkaczmarek przemkaczmarek Jun 30, 2026

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.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in 477ec0a — switched to %w so the marshal error wraps properly for errors.Is()/errors.As().

Comment on lines +20 to +22
if buildErr != nil {
t.Fatalf("Builder returned unexpected error %v", buildErr)
}

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.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in 477ec0a — the Builder ignores the server arg, so I replaced it with config.Server{}.

@@ -0,0 +1,124 @@
{

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.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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
@austinbyron

Copy link
Copy Markdown
Author

Thanks for the thorough review, @przemkaczmarek! Pushed 477ec0a addressing all three points:

  • Wrapped the marshal error with %w instead of %v so it's inspectable via errors.Is()/errors.As().
  • Removed the unused config.Server fields (ExternalUrl, GvlID, DataCenter) from the JSON-samples test — Builder doesn't read the server arg.
  • 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.

The maintainer-email verification has also been sent (replied on that thread). Re-requested review — thanks again!

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.

2 participants