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

add custom keyword support for pbs bid adapter #1763

Merged
merged 4 commits into from
Nov 14, 2017

Conversation

jsnellbaker
Copy link
Collaborator

@jsnellbaker jsnellbaker commented Oct 24, 2017

Type of change

  • Feature

Description of change

Previously any custom param keypairs within the appnexus bidder were ignored and were not properly transferred to pbs. This change now collects all the custom params and collates them under a single keywords param field in a format that pbs can ingest correctly for the AppNexus adapter.

Quick list of some features:

  • Any keyvalues that were integers are converted to strings
  • In case where only a key is specified (ie keyvalue is null), the key alone is passed along
  • Each keyvalue (or set of keyvalues) are stored within its own array; this is for pbs to parse them out appropriately

Other information

For RAD-1704

Copy link
Collaborator

@matthewlane matthewlane left a comment

Choose a reason for hiding this comment

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

May want to add a test. You could set up custom params in here, invoke callBids, and then examine the fake request for expected values similar to the test here. Otherwise LGTM

@@ -98,6 +98,25 @@ function PrebidServer() {
}
}
});
// will collect any custom params and place them under bid.params.keywords attribute in the following manner for pbs to ingest properly
// "keywords":[{"key":"randomKey","value":["123456789"]},{"key":"single_test"},{"key":"myVar","value":["myValue","124578"]}]
let kw_array = [];
Copy link
Member

Choose a reason for hiding this comment

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

nit: convention is camalCase.

@mkendall07
Copy link
Member

@jsnellbaker
Could use minor update before merge.

@jsnellbaker
Copy link
Collaborator Author

I have made some updates and added a test case in the areas @matthewlane suggested.

Please take a look and let me know if anything else should be reviewed again.

@matthewlane matthewlane merged commit d3c2b02 into master Nov 14, 2017
@matthewlane matthewlane deleted the cust_keyword_support_for_pbs branch November 14, 2017 13:27
Millerrok pushed a commit to Vertamedia/Prebid.js that referenced this pull request Nov 21, 2017
* unstream/master: (36 commits)
  + Add Optimatic Bid Adapter (prebid#1837)
  Add Bridgewell adapter (prebid#1825)
  Kumma adapter updated for Prebid 1.0 (prebid#1766)
  Touchup add bid response (prebid#1822)
  Fix skipped test (prebid#1836)
  Added new size in Rubicon pbjs Adapter (prebid#1842)
  HuddledMasses header bidding adapter (prebid#1806)
  Increment pre version
  Prebid 0.33.0 Release
  Update AOL adapter for v1.0  (prebid#1693)
  Sovrn 1.0 compliance (prebid#1796)
  Platform.io Bidder Adapter update (prebid#1817)
  Drop non-video bidders from video ad units (prebid#1815)
  Update renderAd to replace ${AUCTION_PRICE} in adUrl (prebid#1795)
  Pulsepoint adapter: fixing bid rejection due to missing mandatory bid params. (prebid#1823)
  Remove require.ensure entirely (prebid#1816)
  Add custom keyword support for pbs bid adapter (prebid#1763)
  OpenX Video Adapter update to Prebid v1.0 (prebid#1724)
  Fix test that hard-coded pbjs global. (prebid#1786)
  Update Pollux Adapter to v1.0 (prebid#1694)
  ...
vzhukovsky added a commit to aol/Prebid.js that referenced this pull request Dec 28, 2017
….33.0 to aolgithub-master

* commit '3e9756098bb20ecbe0314f16eed5298c5675b24c': (32 commits)
  Wrapped content type in options object.
  Added partners ids.
  Added changelog entry.
  Prebid 0.33.0 Release
  Update AOL adapter for v1.0  (prebid#1693)
  Sovrn 1.0 compliance (prebid#1796)
  Platform.io Bidder Adapter update (prebid#1817)
  Drop non-video bidders from video ad units (prebid#1815)
  Update renderAd to replace ${AUCTION_PRICE} in adUrl (prebid#1795)
  Pulsepoint adapter: fixing bid rejection due to missing mandatory bid params. (prebid#1823)
  Remove require.ensure entirely (prebid#1816)
  Add custom keyword support for pbs bid adapter (prebid#1763)
  OpenX Video Adapter update to Prebid v1.0 (prebid#1724)
  Fix test that hard-coded pbjs global. (prebid#1786)
  Update Pollux Adapter to v1.0 (prebid#1694)
  PubMatic adapter (prebid#1707)
  Added sizes to Rubicon Adapter (prebid#1818)
  jsonpFunction name should match the namespace (prebid#1785)
  Adding 33Across adapter (prebid#1805)
  Unit test fix (prebid#1812)
  ...
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* initial commit to add custom keyword support for pbs adapter

* fixing small typo

* modified variable convention and added unit test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants