-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New Adapter onetagBidAdapter #2461
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
New Adapter onetagBidAdapter #2461
Conversation
This also needs a PR against https://github.com/prebid/prebid.github.io/tree/master/dev-docs/bidders. |
We made a PR against https://github.com/prebid/prebid.github.io/tree/master/dev-docs/bidders, can you please check here: prebid/prebid.github.io#740. Thanks @bretg any news about this PR? |
@jaiminpanchal27 could you please review the PR and let us know? |
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.
@OneTagDevOps Left some comments.
I am not receiving bids back with the test params you provided. Please provide valid params.
modules/onetagBidAdapter.js
Outdated
body.bids.forEach(function(bid) { | ||
bids.push({ | ||
requestId: bid.requestId, | ||
cpm: 0.5, |
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.
Why is this cpm hardcoded ?
modules/onetagBidAdapter.js
Outdated
return bids; | ||
} | ||
|
||
function getUserSyncs(syncOptions, serverResponses) { |
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.
getUserSyncs is optional. you can remove if not using.
* Returns information about the page needed by the server in an object to be converted in JSON | ||
* @returns {{location: *, referrer: (*|string), masked: *, wWidth: (*|Number), wHeight: (*|Number), sWidth, sHeight, date: string, timeOffset: number}} | ||
*/ | ||
function getPageInfo() { |
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.
We do have bunch of functions in utils for what you are doing here. Can you check if it fits your needs
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 believe this is not a blocking factor? We'd like to see into the util functions in the next release.
modules/onetagBidAdapter.js
Outdated
const bidObject = {'bids': bids}; | ||
const pageInfo = getPageInfo(); | ||
|
||
const payload = mergeObjects(bidObject, pageInfo); |
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.
Can you use Object.assign() here ? What is the need for this function.
}); | ||
|
||
const d = serverRequest.data; | ||
const data = JSON.parse(d); |
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.
wrap all JSON.parse in try/catch
modules/onetagBidAdapter.js
Outdated
export const spec = { | ||
|
||
code: BIDDER_CODE, | ||
aliases: [], |
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 if you don't need alias
@jaiminpanchal27 Thanks for the review, I believe our last commits should have solved all the issues. |
@jaiminpanchal27 please let us know whether everything works fine |
Type of change
Description of change
Add new Bid Adapter onetagBidAdapter
Be sure to test the integration with your adserver using the Hello World sample page.
For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:
Other information