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

Refactored URL query parameter passthrough for additional values, cha… #2758

Merged
merged 1 commit into from
Jun 22, 2018

Conversation

mrcrawfo
Copy link
Contributor

@mrcrawfo mrcrawfo commented Jun 21, 2018

…nged SSP endpoint to v.lkqd.net, and updated associated unit tests

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

  • test parameters for validating bids
{
  bidder: '<bidder name>',
  params: {
    // ...
  }
}

Be sure to test the integration with your adserver using the Hello World sample page.

  • contact email of the adapter’s maintainer
  • official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

…nged SSP endpoint to v.lkqd.net, and updated associated unit tests
}
if (bidRequest.params.hasOwnProperty('gdprcs') && bidRequest.params.gdprcs != null) {
sspData.gdprcs = bidRequest.params.gdprcs;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

just verifying that you expect gdpr params to be passed through in the bid params rather than the bidderRequest.gdprConsent object generally sent to buildRequests(): buildRequests: function (bidRequests, bidderRequest) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you very much for confirming on this, it's an interesting point. You are correct that we are using custom parameters for our GDPR handling, even though there is likely overlap between your gdprConsent object and our gdprcs (consent string). I was unaware of bidderRequest.gdprConsent so I will have to familiarize myself with the documentation - we will likely add support through this property in a later pull request, but for the moment we are going to proceed with our own implementation. Thank you for bringing this feature to my attention!

if (bidRequest.params.hasOwnProperty('contentUrl') && bidRequest.params.contentUrl != null) {
sspData.contenturl = bidRequest.params.contentUrl;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

just a suggestion to make this more concise - maybe create a function to do this repetitious task. Something like:
function _addParam(param, default) {
if (bidRequest.params.hasOwnProperty(param) && bidRequest.params[param] != null) {
sspData[param] = bidRequest.params[param];
} else if (default != null) {
sspData[param] = default;
}
}

then you just repeat
_addParam(<bidParam>, <optionalDefault>);
or could even put it in a loop (loop through all your params)

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 a good suggestion - I will look into adding this improvement in a future commit but I would consider it out of scope and don't want it to hold up this current pull request.

Copy link
Collaborator

@harpere harpere left a comment

Choose a reason for hiding this comment

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

Looks good. just have one question and comment.

@harpere harpere self-assigned this Jun 22, 2018
@mrcrawfo
Copy link
Contributor Author

Thank you harpere for following up on this pull request, I have read your comments and provided my feedback to answer the remaining question. I think we are clear to proceed, but just let me know if you have anything else you would like to review. Thank you!

@harpere harpere added LGTM and removed needs review labels Jun 22, 2018
@harpere harpere merged commit 60e84cf into prebid:master Jun 22, 2018
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
…nged SSP endpoint to v.lkqd.net, and updated associated unit tests (prebid#2758)
florevallatmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Sep 6, 2018
…nged SSP endpoint to v.lkqd.net, and updated associated unit tests (prebid#2758)
StefanWallin pushed a commit to mittmedia/Prebid.js that referenced this pull request Sep 28, 2018
…nged SSP endpoint to v.lkqd.net, and updated associated unit tests (prebid#2758)
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
…nged SSP endpoint to v.lkqd.net, and updated associated unit tests (prebid#2758)
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
…nged SSP endpoint to v.lkqd.net, and updated associated unit tests (prebid#2758)
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
…nged SSP endpoint to v.lkqd.net, and updated associated unit tests (prebid#2758)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants