Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support aliases in prebidServer #2257

Merged
merged 2 commits into from
Mar 26, 2018
Merged

Support aliases in prebidServer #2257

merged 2 commits into from
Mar 26, 2018

Conversation

matthewlane
Copy link
Collaborator

@matthewlane matthewlane commented Mar 12, 2018

Type of change

  • Feature

Description of change

Supports calling bider adapter aliases with prebidServer adapter (OpenRTB endpoint only). In a prebid setup, add a known alias to the s2sConfig.bidders array, and that will take part in the s2s auction.

Example config - known alias

pbjs.setConfig({
  s2sConfig: {
    enabled: true,
    accountId: '123-456',
    endpoint: 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction',
    bidders: ['appnexus', 'brealtime'],
  },
});

// brealtime and appnexusAst are both aliases of appnexus
// appnexus and brealtime will take part in the s2s auction since they are listed in s2sConfig.bidders
// appnexusAst will be run client-side
pbjs.addAdUnits({
    // ...
    bids: [
      {
        bidder: 'appnexus',
        params: { placementId: '123' }
      },
      {
        bidder: 'brealtime',
        params: { placementId: '123' }
      },
      {
        bidder: 'appnexusAst',
        params: { placementId: '456' }
      },
    ],
   // ...
  });

Example config - dynamic alias

pbjs.aliasBidder('appnexus', 'newAlias');

pbjs.setConfig({
  s2sConfig: {
    enabled: true,
    accountId: '123-456',
    endpoint: 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction',
    bidders: ['newAlias'],
  },
});

// newAlias will take part in s2s auction
pbjs.addAdUnits({
    // ...
    bids: [
      {
        bidder: 'newAlias',
        params: { placementId: '123' }
      },
    ],
   // ...
  });

Copy link
Collaborator

@bretg bretg left a comment

Choose a reason for hiding this comment

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

Is there a way to implement these aliases without tying prebidServerBidAdapter to the appnexusBidAdapter?

@matthewlane
Copy link
Collaborator Author

@bretg Yes, the aliases array can be copied into this file. In that case whenever an appnexus alias is added, modified, or removed, both arrays will need to be edited

Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

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

Please update to be compatible with pbjs.aliasBidder thanks.

@chefbenjamin
Copy link

Any ETA to when this feature might be available ?

@matthewlane matthewlane force-pushed the prebid-server-aliases branch from 14b4349 to 0d4f476 Compare March 16, 2018 22:26
@matthewlane matthewlane changed the title Support AppNexus aliases in prebidServer Support aliases in prebidServer Mar 16, 2018
@matthewlane matthewlane added needs review needs 2nd review Core module updates require two approvals from the core team and removed needs update labels Mar 16, 2018
@mkendall07
Copy link
Member

mkendall07 commented Mar 19, 2018

@bretg
could use a review on this one from Rubicon side.

@bretg bretg requested a review from idettman March 23, 2018 13:56
Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

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

Looks great and clean code!

@mkendall07 mkendall07 merged commit feafdcf into master Mar 26, 2018
@matthewlane matthewlane deleted the prebid-server-aliases branch March 27, 2018 15:40
mifefr added a commit to mifefr/Prebid.js that referenced this pull request Mar 29, 2018
* 'master' of https://github.com/prebid/Prebid.js:
  EngageBDR New Bid Adapter (prebid#2309)
  [FEAT] adunit sizes support (prebid#2320)
  Support aliases in prebidServer (prebid#2257)
  Changing default currency file to https (prebid#2306)
  Update stalebot labels (prebid#2319)
  Enhance location detection within utils (prebid#2167)
  if cache markup is not enabled, set it to the default value 0 (prebid#2302)
  Serverbid Bid Adapter: Added archon alias (prebid#2293)
  Smart Ad Server: Fix bug when multi bids (prebid#2170)
  NEW adapter AdtelligentBidAdapter (prebid#2137)
  add optional param to bridgewellBidAdapter (prebid#2289)
  Increment Pre Version
  Prebid 1.6.0 Release
  Unit test fixes (prebid#2301)
  PBS videoCacheKey and vastUrl (prebid#2101)
  Add Oneplanetonly Bid Adapter (prebid#2269)
  firing new adRenderFailed event when renderAd() fails (prebid#2210)
  Add Content Ignite adapter (prebid#2268)
  add hb_cache_id, hb_uuid should be deprecated and replaced by hb_cache_id (prebid#2273)
  Update Yieldlab adapter and add official maintainer (prebid#2231)
  Update for Media.net adapter (prebid#2232)
  Update to Rubicon Adapter for mediaTypes support (prebid#2272)
  message formatting (prebid#2285)
  Yieldbot impression image creation fix (prebid#2277)
  Updated Bid params (prebid#2275)
  Audience Network: Add 'pbv' and 'cb' query params (prebid#2252)
  Add e-planning analytics adapter (prebid#2211)
  Add vastUrl for Gamma Adapter Video (prebid#2261)
  update params for test bid (prebid#2267)
  Updated adUnitCode (prebid#2262)
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Support AppNexus aliases in s2s request

* Support dynamic aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants