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

Update to XHB adapter #2536

Merged
merged 31 commits into from
Jun 11, 2018
Merged

Update to XHB adapter #2536

merged 31 commits into from
Jun 11, 2018

Conversation

daniel-hoffmann
Copy link
Contributor

Update to XHB adapter for GDPR and v1

@jsnellbaker jsnellbaker self-assigned this May 15, 2018
@jsnellbaker
Copy link
Collaborator

@daniel-hoffmann Can you take a look at the Travis errors and resolve them when you get the chance? I'll start to look-over the adapter changes in the meantime.

Also, would you be able to open a docs PR in the docs repo and make an update in your bidders page to add the following variable?

gdpr_supported: true

This can go directly below the variable for your 1.0 compliance. This will allow your adapter to appear in a table that shows GDPR compliant adapters.

Thanks.

@jsnellbaker jsnellbaker self-requested a review May 15, 2018 15:10
@daniel-hoffmann
Copy link
Contributor Author

@jsnellbaker Both things have been done - let me know if you need anything else to be changed!

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

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

Hi @daniel-hoffmann Sorry for the small delay, I have some points to review - see in-line below.

Additionally we need to have a unit-test file included for a new adapter submissions. The following page provides some direction on setting up the unit test file: http://prebid.org/dev-docs/bidder-adaptor.html#adding-unit-tests

Can you please put this together and add it to the PR?

function newBid(serverBid, rtbBid, bidderRequest) {
const bid = {
requestId: serverBid.uuid,
cpm: 0.00,
Copy link
Collaborator

Choose a reason for hiding this comment

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

To confirm should be 0 all the time? Shouldn't it pull in the CPM from the returned bid?

Copy link
Member

Choose a reason for hiding this comment

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

This is what Xaxis wants to do since they have pre-arranged deals.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per Matt's comment, yes, that is exactly what we need and together with the hardcoded dealId kinda the whole reason we have our own adapter. ;)

requestId: serverBid.uuid,
cpm: 0.00,
creativeId: rtbBid.creative_id,
dealId: 99999999,
Copy link
Collaborator

Choose a reason for hiding this comment

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

The dealId field is an optional field and doesn't have to be explicitly set. If you're not planning on using it, it could be removed instead of hard-coding to a set value. If you are using that set value for a particular use-case, please let me know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary for our setup.

required: true
},
brand: {
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the test placement - the brand is not included which is preventing the bid from being accepted by the native param checks. If you want the brand to be a required field in general for your publishers, could you update the test ad unit to include this field? If the field isn't strictly required, could you update this .md file?

Copy link
Contributor Author

@daniel-hoffmann daniel-hoffmann Jun 11, 2018

Choose a reason for hiding this comment

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

Actually, I just copied this from the AN adapter, I assume that one has the same issue? I'll look into it and will change it in ours. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we don't need that to be required.
Can I just set it to false in the md file?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's fine, or you could just remove the brand object entirely.

@jsnellbaker jsnellbaker removed the request for review from bokelley May 31, 2018 12:02
@mkendall07
Copy link
Member

@daniel-hoffmann
looks like you need to add a test spec file. You can see example here: https://github.com/prebid/Prebid.js/blob/master/test/spec/modules/appnexusBidAdapter_spec.js

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

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

LGTM

@jsnellbaker jsnellbaker merged commit cbe67a3 into prebid:master Jun 11, 2018
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* xhb adapter added - use AppNexus test ad unit

* adjusted adapter to set responseCPM to 0 and add in dealId

* implemented suggested changes

* implemented suggested changes

* ran jscs fixer for xhb.js and added it to adapters.json

* Xhb adapter: adding alias support

* minor changes as per request

* re-added default bidder settings

* Bugfix: getBidRequest was missing utils

* minor fix to _defaultBidderSettings

* added size to defaultBidderSettings

* XHB adapter updated to work with prebid 1.0

* XHB adapter updated to work with prebid 1.0

* updated xhb adapter to incorporate latest AN adapter changes

* further fixes for 1.0 adapter

* updated Adapter to latest version

* indentation fixed

* unit tests for xhb Adapter

* xhbBidAdapter: removed brand from md file
florevallatmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Sep 6, 2018
* xhb adapter added - use AppNexus test ad unit

* adjusted adapter to set responseCPM to 0 and add in dealId

* implemented suggested changes

* implemented suggested changes

* ran jscs fixer for xhb.js and added it to adapters.json

* Xhb adapter: adding alias support

* minor changes as per request

* re-added default bidder settings

* Bugfix: getBidRequest was missing utils

* minor fix to _defaultBidderSettings

* added size to defaultBidderSettings

* XHB adapter updated to work with prebid 1.0

* XHB adapter updated to work with prebid 1.0

* updated xhb adapter to incorporate latest AN adapter changes

* further fixes for 1.0 adapter

* updated Adapter to latest version

* indentation fixed

* unit tests for xhb Adapter

* xhbBidAdapter: removed brand from md file
StefanWallin pushed a commit to mittmedia/Prebid.js that referenced this pull request Sep 28, 2018
* xhb adapter added - use AppNexus test ad unit

* adjusted adapter to set responseCPM to 0 and add in dealId

* implemented suggested changes

* implemented suggested changes

* ran jscs fixer for xhb.js and added it to adapters.json

* Xhb adapter: adding alias support

* minor changes as per request

* re-added default bidder settings

* Bugfix: getBidRequest was missing utils

* minor fix to _defaultBidderSettings

* added size to defaultBidderSettings

* XHB adapter updated to work with prebid 1.0

* XHB adapter updated to work with prebid 1.0

* updated xhb adapter to incorporate latest AN adapter changes

* further fixes for 1.0 adapter

* updated Adapter to latest version

* indentation fixed

* unit tests for xhb Adapter

* xhbBidAdapter: removed brand from md file
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
* xhb adapter added - use AppNexus test ad unit

* adjusted adapter to set responseCPM to 0 and add in dealId

* implemented suggested changes

* implemented suggested changes

* ran jscs fixer for xhb.js and added it to adapters.json

* Xhb adapter: adding alias support

* minor changes as per request

* re-added default bidder settings

* Bugfix: getBidRequest was missing utils

* minor fix to _defaultBidderSettings

* added size to defaultBidderSettings

* XHB adapter updated to work with prebid 1.0

* XHB adapter updated to work with prebid 1.0

* updated xhb adapter to incorporate latest AN adapter changes

* further fixes for 1.0 adapter

* updated Adapter to latest version

* indentation fixed

* unit tests for xhb Adapter

* xhbBidAdapter: removed brand from md file
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
* xhb adapter added - use AppNexus test ad unit

* adjusted adapter to set responseCPM to 0 and add in dealId

* implemented suggested changes

* implemented suggested changes

* ran jscs fixer for xhb.js and added it to adapters.json

* Xhb adapter: adding alias support

* minor changes as per request

* re-added default bidder settings

* Bugfix: getBidRequest was missing utils

* minor fix to _defaultBidderSettings

* added size to defaultBidderSettings

* XHB adapter updated to work with prebid 1.0

* XHB adapter updated to work with prebid 1.0

* updated xhb adapter to incorporate latest AN adapter changes

* further fixes for 1.0 adapter

* updated Adapter to latest version

* indentation fixed

* unit tests for xhb Adapter

* xhbBidAdapter: removed brand from md file
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
* xhb adapter added - use AppNexus test ad unit

* adjusted adapter to set responseCPM to 0 and add in dealId

* implemented suggested changes

* implemented suggested changes

* ran jscs fixer for xhb.js and added it to adapters.json

* Xhb adapter: adding alias support

* minor changes as per request

* re-added default bidder settings

* Bugfix: getBidRequest was missing utils

* minor fix to _defaultBidderSettings

* added size to defaultBidderSettings

* XHB adapter updated to work with prebid 1.0

* XHB adapter updated to work with prebid 1.0

* updated xhb adapter to incorporate latest AN adapter changes

* further fixes for 1.0 adapter

* updated Adapter to latest version

* indentation fixed

* unit tests for xhb Adapter

* xhbBidAdapter: removed brand from md file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants