Skip to content

Update adapter: Selectmedia#14867

Open
selectmediaPrebid wants to merge 2 commits into
prebid:masterfrom
selectmediaPrebid:master
Open

Update adapter: Selectmedia#14867
selectmediaPrebid wants to merge 2 commits into
prebid:masterfrom
selectmediaPrebid:master

Conversation

@selectmediaPrebid
Copy link
Copy Markdown

Type of change

  • Updated bidder adapter

Description of change

Update from alias to a separate adapter, add support for 2 regions

Other information

Doc PR - prebid/prebid.github.io#6560

Copy link
Copy Markdown

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

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: ccc022475a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread modules/selectmediaBidAdapter.ts

const BIDDER_CODE = 'selectmedia';
const AD_URL = 'https://#{REGION}#.zxyvrtd.com/pbjs';
const GVLID = 775;
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.

this appears to be the gvlid of a different company

validBidRequests: BidRequest<typeof BIDDER_CODE>[],
bidderRequest: BaseBidderRequest<typeof BIDDER_CODE>
): AdapterRequest => {
const region = validBidRequests[0]?.params?.region;
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.

why not base this on the user timezone instead of the config?

gvlid: GVLID,
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

isBidRequestValid: (bid) => baseIsBidRequestValid(bid) && VALID_REGIONS.has(bid.params?.region),
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.

is region required? your md file never mentions it. also if you need the pub to fill it in perhaps tell them how to do so based on Intl.DateTimeFormat().resolvedOptions().timeZone or preferably, import

return Intl.DateTimeFormat().resolvedOptions().timeZone;
and examine this function from smartyads
export function getAdUrlByRegion(bid) {

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.

or this one from escalax

function getSubdomain() {

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