-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 new adapter ServerBid (by Adzerk) #1024
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GaryKertis Please check the comments. Thanks.
src/adapters/serverbid.js
Outdated
placements: [], | ||
time: Date.now(), | ||
user: {}, | ||
url: document.location.href, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend using these function utils.getTopWindowUrl() and utils.getTopWindowLocation()
src/adapters/serverbid.js
Outdated
placementCode = bidObj.placementCode; | ||
|
||
//prepare a no bid response. | ||
bid = bidfactory.createBid(2, bidObj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to else part. In case you get result, this code is of no use.
src/adapters/serverbid.js
Outdated
|
||
var bids = params.bids || []; | ||
for (var i = 0; i < bids.length; i++) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra line breaks in this file.
src/adapters/serverbid.js
Outdated
|
||
var baseAdapter = Adapter.createNew('serverbid'); | ||
|
||
var BASE_URI = '//e.serverbid.com/api/v2'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using const/let is recommended.
@jaiminpanchal27 I have incorporated these changes. Please let me know if there are any other concerns. Thanks! |
@GaryKertis utils.getTopWindowUrl is a function. Check line 54 in serverbid.js |
Oops. @jaiminpanchal27 fixed. |
LGTM. Thanks @GaryKertis |
This is merged into master. Please submit a PR to the docs repo to add a file for your adapter to the bidders directory so your adapter's params will appear on the bidders page. Thank you for contributing |
* Wrote initial call logic to make request to serverbid. * Add initial bid response handling logic. * Handle requests and responses, successfully pass to add server, write initial tests. * Clean up pricing and fix tests. * Enable request credentials. * JSHint and JSCS * Incorporate code review comments. * Add function invocation to getTopWindowUrl
…built * 'master' of https://github.com/prebid/Prebid.js: Add GourmetAds AppNexus Alias (prebid#1057) fix issue calling `requestBids();` (prebid#1058) explicit win url response format as pixel (prebid#1001) OpenX Adapter: Correctly gets the page domain for cross-domain iframes (prebid#1027) better http/s support (prebid#1010) Add a new generated field transactionId to each adunits. (prebid#1040) Update readme (prebid#1053) PulsePoint Lite adapter (prebid#1016) Add new adapter ServerBid (by Adzerk) (prebid#1024) Fix Mantis tests in negative timezone (prebid#1049) Add deal id handling (prebid#1044) sanitize bidderRequest to rubicon adapter to ensure accountId is sent (prebid#1030) Bidfluence Adapter (prebid#1023) Update uglify-js version (prebid#1041) Add dev dependencies. hb_adid should be uppercase in all cases (prebid#1037) Add TapSense Header Bidding Adapter and tests (prebid#1004) iOS Referrer fix (prebid#996) Change identification of JavaScript user matching (prebid#1022) Fixed mixed tabs/spaces in wideorbit adapter (prebid#1031)
* Wrote initial call logic to make request to serverbid. * Add initial bid response handling logic. * Handle requests and responses, successfully pass to add server, write initial tests. * Clean up pricing and fix tests. * Enable request credentials. * JSHint and JSCS * Incorporate code review comments. * Add function invocation to getTopWindowUrl
Type of change
Description of change
Add ServerBid (by Adzerk) adapter.
Other information