-
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
Justpremium Adapter #1227
Justpremium Adapter #1227
Conversation
@mkalafior I see that your external js file http://d2nvliyzbo36lk.cloudfront.net/adp/bc.js playing around with |
@jaiminpanchal27 sure, I was doing two things there (was as this is deprecated part of the code kept only for backward compatibility). At first I was detecting under which variable prebid is stored (one of our test publisher is using different name than |
@mkalafior no bidder adapters is allowed to track winning bids that are not their own. So update your js code accordingly. |
@jaiminpanchal27 i updated the code, please check it and tell me if its ok for you now. |
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 was able to get bid response back but didn't see ad loading. Can you check on that.
Also i left few comments.
Thanks
src/adapters/justpremium.js
Outdated
zone: zone, | ||
hostname: d.location.hostname, | ||
protocol: d.location.protocol.replace(':', ''), | ||
sw: top.screen.width, |
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 am not sure but i think top.screen will throw error in cross domain iframe. Can you also confirm other usage of top in this function.
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.
Will check that.
src/adapters/justpremium.js
Outdated
bidmanager.addBidResponse(bid.placementCode, bidder.createBid(function (ad) { | ||
let bidObject; | ||
if (!ad) { | ||
bidObject = bidfactory.createBid(2); |
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.
Please add bid object as second parameter in createBid call. Also it would be great if you can use STATUS.GOOD constant instead of 1 defined in constants.json file
src/adapters/justpremium.js
Outdated
bidmanager.addBidResponse(bid.placementCode, bidObject); | ||
bid = findBid(zone, reqBids); | ||
} | ||
console.error(err); |
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.
Use utils.logError
src/adapters/justpremium.js
Outdated
} | ||
|
||
function loadResources() { | ||
if (toLoad.length > 0) { |
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.
Any reason toLoad is array. If not than you can update this code
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.
In development mode, instead of one file, few separated ones are loaded. For this purpose I would prefer to leave it as it is. Of course if its ok for you.
@jaiminpanchal27 I updated the code and also applied most of your suggestions (I only left |
modules/justpremiumBidAdapter.js
Outdated
bidmanager.addBidResponse(bid.placementCode, bidder.createBid(function (ad) { | ||
let bidObject; | ||
if (!ad) { | ||
bidObject = bidfactory.createBid(CONSTANTS.STATUS.NO_BID); |
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.
Need to pass through the bidObj
from the request. Take a look at other adapters for examples
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.
Pass through bidObj so we can get the request bid.id
@mkendall07, @jaiminpanchal27 are you able to check my last commit? I followed the instruction given by @mkendall07. Is there anything else which is blocking us to merge this PR? |
@mkendall07 could you please review the change that was requested? |
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.
LGTM. Please note that as of prebid 1.0, we won't accept bidders that load external JS for fetching demand. Only XHR requests will be supported.
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 |
* Justpremium adapter and unit tests. * Fix test suit. * Performance improvements. * Changes requested in pull request review. * Register justpremium adapter in adaptermanager * pass through bid from request * fix linting errors
* Justpremium adapter and unit tests. * Fix test suit. * Performance improvements. * Changes requested in pull request review. * Register justpremium adapter in adaptermanager * pass through bid from request * fix linting errors
* Justpremium adapter and unit tests. * Fix test suit. * Performance improvements. * Changes requested in pull request review. * Register justpremium adapter in adaptermanager * pass through bid from request * fix linting errors
Type of change
Description of change
New adapter from Justpremium
contact email of the adapter’s maintainer
sebastian.widelak@justpremium.com
official adapter submission