-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add bucksense Adapter #3785
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 bucksense Adapter #3785
Conversation
docs PR prebid/prebid.github.io#1284 |
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.
Thanks for submitting this adapter. I took a look through the changes, and there are a few things that need to be addressed. Please take at the notes below when you have the chance and let me know if you have any questions. Thanks!
General point:
- The code coverage for the unit tests only reach 56.45%. For adapters, we'd want this to be at least 80% coverage. Can you add some more unit tests to fill the gaps? You can use the
gulp test-coverage
andgulp view-coverage
in your prebid project to review the missing areas. Alternatively - you could remove some the empty functions from your adapter; this could help reduce the coverage gap (see comments below for the specific areas related to this point).
modules/bucksenseBidAdapter.js
Outdated
@@ -0,0 +1,171 @@ | |||
import { registerBidder } from 'src/adapters/bidderFactory'; | |||
import { BANNER } from 'src/mediaTypes'; |
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 lieu of this PR #3435, any imported files within a modules file needs to use the relative style path.
Can you please update these imports accordingly?
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.
fixed with new Push
modules/bucksenseBidAdapter.js
Outdated
* @return boolean True if this is a valid bid, and false otherwise. | ||
*/ | ||
isBidRequestValid: function (bid) { | ||
if (isNaN(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.
The bid
param is an object at this stage of the code, so this if statement check will always return true
and cause the bidRequest for your bidder to be considered invalid.
Can you review this logic and adjust it accordingly?
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.
fixed with new Push
modules/bucksenseBidAdapter.js
Outdated
data: { | ||
'pub_id': location.host, | ||
'pl_id': bid.params.placementId, | ||
'sys_href': encodeURI(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.
If you haven't already looked at it, there are a set of data points you can use in your adapter to get information on the webpage loading the adapter. Please see the link below and consider using them if they would fit your needs:
http://prebid.org/dev-docs/bidder-adaptor.html#referrers
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.
Thanks for point to this but in this release we would like to keep using the location object if it is not a problem
modules/bucksenseBidAdapter.js
Outdated
* @param {ServerResponse[]} serverResponses List of server's responses. | ||
* @return {UserSync[]} The user syncs which should be dropped. | ||
*/ | ||
getUserSyncs: function(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.
Is this code still a work-in-progress?
If not and you're not planning to support userSyncs (at least at this time) - you can just remove this function entirely from your adapter.
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.
function not needed on this release, we removed.
modules/bucksenseBidAdapter.js
Outdated
* @param ... | ||
* @return ... | ||
*/ | ||
onTimeout: function(timeoutData) { |
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.
Similar to the getUserSyncs function - you can remove this function if you're not planning to use it.
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.
function not needed on this release, we removed.
modules/bucksenseBidAdapter.js
Outdated
* @param {object} bid The bid to validate. | ||
* @return ... | ||
*/ | ||
onBidWon: function(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.
Similar to the getUserSyncs function - you can remove this function if you're not planning to use it.
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.
function not needed on this release, we removed.
modules/bucksenseBidAdapter.js
Outdated
|
||
const WHOIS = 'BKSHBID-008'; | ||
const BIDDER_CODE = 'bucksense'; | ||
const URL = 'https://prebid.bksn.se:445/prebid'; |
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.
Is this the correct endpoint URL for your adapter?
When I tried to test the adapter, the POST requests to this URL were resulting in a 301 Moved Permanently response.
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.
Yes request is doing a 301 but then got redirect to the script that return the BID. I have tested the prebid on the Hello World example. Let me know if you do not see the response at all from your test.
Hi @bkse-stefanodechicchis, Thanks for making the updates. I retested the adapter and was now able to see the bid return and render successfully. However, when I reran the coverage tests - the adapter is still below the ideal; it's at 72% currently. Also can you update the various We should be good to merge once these last few items are addressed. Thanks. |
Just to clarify, you are looking at your specific adapter's coverage rate correct? It's inside the modules sub-folder in that initial screen. See below for example: From what I can see (currently with what has been committed), the outstanding areas all relate to the If you setup a pair of tests where that field is enabled (one for |
- removed console.log and using utils.logInfo(); - removed bksdebug params; pending issue: - gulp test-coverage still under 80%
Hi @bkse-stefanodechicchis I checked out your updates to the adapter test cases. I'm seeing your adapter coverage at 94% now (see below): Are you not seeing the same thing? If you're happy with how your adapter is handling certain scenarios (this is in reference to your last comment on the if/else statements in the Please let me know when you have the chance. |
Hi, I get confuse I was looking at column "Branches" and the % was low there. |
* Add bucksense Adapter * fixed first revision for new Bucksense adapter approval https://circleci.com/gh/prebid/Prebid.js/2365? * fixed second revision for new Bucksense adapter approval from jsnellbaker prebid#3785 * fixed third revision for new Bucksense adapter approval. prebid#3785 * fixed 4th revision from jsnellbaker - removed console.log and using utils.logInfo(); - removed bksdebug params; pending issue: - gulp test-coverage still under 80%
* Add bucksense Adapter * fixed first revision for new Bucksense adapter approval https://circleci.com/gh/prebid/Prebid.js/2365? * fixed second revision for new Bucksense adapter approval from jsnellbaker prebid#3785 * fixed third revision for new Bucksense adapter approval. prebid#3785 * fixed 4th revision from jsnellbaker - removed console.log and using utils.logInfo(); - removed bksdebug params; pending issue: - gulp test-coverage still under 80%
Type of change
Description of change
This is first release for Bucksense Adapter
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