Skip to content

New Adapter: Peak226 - #4919

Open
chanand wants to merge 2 commits into
prebid:masterfrom
plymedia:peak226-bid-adapter
Open

New Adapter: Peak226#4919
chanand wants to merge 2 commits into
prebid:masterfrom
plymedia:peak226-bid-adapter

Conversation

@chanand

@chanand chanand commented Aug 24, 2026

Copy link
Copy Markdown

New Adapter: Peak226

Branch: peak226-bid-adapter (cut from upstream master @ 0ba352315)

Docs PR: prebid/prebid.github.io#6715 — rewrites the 2018 dev-docs/bidders/peak226.md stub.

Prebid.js adapter: not part of this submission. The docs PR is scoped server-only (pbjs: false); a Prebid.js adapter is planned as a separate PR.


Description

Adds the peak226 server-side bid adapter (Edge226 Ltd), supporting banner, video and
native for both site and app traffic.

  • Bidder code: peak226
  • Maintainer: support@edge226.com
  • GVL vendor ID: 1202 (registered as "Edge226 Ltd")
  • Endpoint: https://{{.Region}}.a.viddea.com/edge_direct

Imp params

Name Required Type Description
publisherId yes string Publisher/account ID. Written to site.publisher.id or app.publisher.id.
placementId yes string Placement ID; sent as imp.tagid.
region no string One of us, eu, jp. Defaults to us. Resolves the {{.Region}} endpoint macro.

Behavior worth a reviewer's attention

Requests are split per region

region selects a data center, so imps are grouped by their own region value and one request
is emitted per distinct region — each carrying only its own impressions, in first-seen order —
rather than routing everything to the first imp's region. Each region group also resolves its
own effective publisherId. Covered by supplemental/multi-region-split.json.

The adapter modifies device — please read this bit

sanitizeDevice clears device.ifa when it is the all-zero sentinel
(00000000-0000-0000-0000-000000000000) that the OS reports when app tracking permission was
declined (e.g. iOS ATT). It is not a real device ID, and forwarding it as though it were is
misleading to the bidder.

I want to flag this explicitly since an adapter touching device is unusual and reasonably draws
scrutiny. It is not duplicating core behavior: privacy/lmt/ios.go inspects this sentinel but
never clears it, so nothing upstream of the adapter removes it. The original request.Device is
not mutated — a copy is taken. If maintainers would prefer this live in core (or not happen at
all), I'm happy to drop it from this PR and raise it separately. Covered by
supplemental/app-zero-ifa-cleared.json.

${AUCTION_PRICE} is resolved in MakeBids

peak226 always returns the ${AUCTION_PRICE} macro in adm (and nurl) as its counting
mechanism and relies on the demand-side adapter to expand it, so resolveMacros substitutes the
bid price before the TypedBid is built. Without it the literal macro text would render in the
creative and the win notice would report the wrong price. Covered by
supplemental/auction-price-macro.json.

Imp ext handling

stripBidderExt removes only the bidder key from imp.ext, preserving non-bidder signals such
as gpid, data and tid that the Prebid.js adapter also forwards. When nothing else remains,
imp.ext is cleared so the impression does not serialize an empty "ext": {}. Covered by
supplemental/imp-ext-passthrough.json and a table-driven unit test.

Bidder-info

static/bidder-info/peak226.yaml declares openrtb: {version: 2.6, gpp-supported: true, multiformat-supported: true}, geoscope: [global] and modifyingVastXmlAllowed: false. No
userSync block is declared: GVL 1202 declares usesCookies: false and does not include
Purpose 1 ("store and/or access information on a device"), so a TCF-compliant CMP has no basis
to authorize a cookie drop. Bidding is unaffected — Purpose 2 (basic ads) is declared. Sync will
be proposed as a follow-up once the GVL entry is corrected and a real sync endpoint exists.

endpointCompression: gzip is deliberately not set — it has not been verified against the
backend.

Test results

$ gofmt -l adapters/peak226 openrtb_ext/imp_peak226.go
(no output)

$ go vet ./adapters/peak226/...
(no output)

$ go test -count=1 ./...
(all packages ok)

$ go test -count=1 -coverprofile=/tmp/p.cover ./adapters/peak226/... \
  && go tool cover -func=/tmp/p.cover | tail -1
total:                    (statements)        93.3%

Adapter coverage: 93.3%, above the 90% floor in docs/developers/contributing.md.

The remaining uncovered statements are the error branches that
docs/developers/contributing.md exempts as unreachable through the JSON test framework —
jsonutil.Marshal failures on a struct that always marshals, and macros.ResolveMacros
failures on a template that parsed successfully at build time.

Test coverage added

Exemplary: banner, video, native, multiformat.

Supplemental: multi-region-split, region-jp-app-publisher, imp-ext-passthrough,
app-device-eids-passthrough, app-zero-ifa-cleared, bidfloor-currency-conversion,
bidfloor-currency-conversion-error, auction-price-macro, invalid-bidder-ext, invalid-imp-ext,
bad-server-response, empty-seatbid, unrecognized-mtype, status-code-bad-request,
status-code-no-content, status-code-server-error.

Go unit tests: TestJsonSamples, TestEndpointTemplateMalformed, TestStripBidderExt
(table-driven: nil ext, empty ext, bidder-only ext, non-bidder keys preserved, malformed JSON),
TestSetPublisherIDEmpty, plus params_test.go schema validation.

Sequencing

The docs page dev-docs/bidders/peak226.md already exists in prebid/prebid.github.io as a 2018
stub from the original Prebid.js adapter removed in Prebid.js 3.0; the docs PR rewrites it
rather than creating it, and is scoped to this server adapter only (pbjs: false, correcting a
flag that has been stale since that removal). The docs front-matter carries pbs: true, which
becomes truthful when this PR merges — happy to sequence the two in whichever order maintainers
prefer.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 5c7d08f90c

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread adapters/peak226/peak226.go Outdated
Impressions sharing a region but declaring different publisherId
values were previously merged into one request, with only the first
non-empty publisherId applied to site/app.publisher.id — silently
misattributing the rest. Grouping is now keyed on (region, publisherId)
so each distinct pair gets its own request.

Addresses Codex review comment on prebid#4919.
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.

1 participant