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

UOL - BidAdapter release candidate #2850

Merged
merged 3 commits into from
Jul 17, 2018
Merged

Conversation

lotani-uolinc
Copy link
Contributor

@lotani-uolinc lotani-uolinc commented Jul 14, 2018

Type of change

  • New bidder adapter

Description of change

New bidAdapter proposal from UOL - Universo Online.

  • test parameters for validating bids
{
  bidder: 'uol',
  params: {
    placementId: 1231244,
    test: true,
    cpmFactor: 2
  }
}
``

- contact email of the adapter’s maintainer
   [email protected]

- [x] official adapter submission

@mkendall07
Copy link
Member

This pull request introduces 1 alert when merging fc26641 into ed28094 - view on LGTM.com

new alerts:

  • 1 for Superfluous trailing arguments

Comment posted by LGTM.com

@jsnellbaker
Copy link
Collaborator

@lotani-uolinc Can you please look into the LGTM error when you get the chance?

@lotani-uolinc
Copy link
Contributor Author

@jsnellbaker, sure thing! Thanks for the feedback.

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.

@lotani-uolinc While you're looking into the LGTM error, I checked the rest of the adapter code. I found a few areas that should be reviewed further.

Additionally, I noticed in your docs PR you had included the gdpr_supported flag. However, I don't see the normal code that reads the buildRequest's bidderRequest.gdprConsent object and pass it along in your request object. Is this code missing or was the flag set incorrectly in the docs PR? Please confirm.

Thanks.

@@ -0,0 +1,202 @@
import * as utils from 'src/utils';
// import {config} from 'src/config';
Copy link
Collaborator

Choose a reason for hiding this comment

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

this comment can be removed.

const UOL_LOG_HEADER = 'UOL Bidder Error: '
export const spec = {
code: BIDDER_CODE,
supportedMediaTypes: ['banner'], // not required since it is default
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could import/use the defined mediaTypes from src/mediaTypes. Eg import { BANNER } from 'src/mediaTypes'; This way you can ensure the values are read correctly.

*/
getUserSyncs: function(syncOptions, serverResponses) {
const syncs = [];
if (syncOptions.iframeEnabled && serverResponses.body.trackingPixel) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

serverResponses is an array of objects, not a single object. This latter half of the code would result in undefined errors. Could you update this logic?

*/
onTimeout: function(data) {
// Bidder specifc code
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any more you would wish to do in the case of a timeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the time being we have no plans hence, Im removing the method call.

@jsnellbaker
Copy link
Collaborator

@lotani-uolinc I saw your response in github before in regards to GDPR support, but I'm not seeing it anymore (not sure what happened).

If you're still not currently planning on supporting GDPR - could you please make a change to your docs PR?

The field in the docs PR is an internal variable for the prebid site that will list that adapter in a certain table of GDPR compliant adapters. Until your adapter supports GDPR, can you either remove the variable or set it to false?

@lotani-uolinc
Copy link
Contributor Author

@jsnellbaker, no problem. We have set it to false and will release it soon. Thanks in advance.

@lotani-uolinc
Copy link
Contributor Author

lotani-uolinc commented Jul 16, 2018

@jsnellbaker, we have addressed the changes requested. Could you please evaluate?
We are at your disposal for any further changes.
Thanks!

@jsnellbaker
Copy link
Collaborator

@lotani-uolinc Thanks for making the updates. They look fine to me. In addition the test param information seems to be working successfully as well.

Something I noticed while testing with browserstack in preparation for the merge were a series of errors from the unit tests. There seemed to be two sets of errors occurring in different browsers (safari mainly) that I've copied down below for reference. Can you take a look and see if something can be done to address these errors?

UOL Bid Adapter
    buildRequests
      buildRequest geolocation param
        �[31m✗ �[39m�[31mshould contain user coordinates if (i) DNT is off; (ii) browser supports implementation; (iii) localStorage contains geolocation history�[39m
	undefined is not an object (evaluating 'navigator.permissions.query')
	grantTriangulation@webpack:///test/spec/modules/uolBidAdapter_spec.js:96:46 <- test/test_index.js:129093:46
	webpack:///test/spec/modules/uolBidAdapter_spec.js:177:8 <- test/test_index.js:129172:27

        �[31m✗ �[39m�[31mshould not contain user coordinates if localStorage is empty�[39m
	undefined is not an object (evaluating 'navigator.permissions.query')
	denyTriangulation@webpack:///test/spec/modules/uolBidAdapter_spec.js:104:46 <- test/test_index.js:129101:46
	webpack:///test/spec/modules/uolBidAdapter_spec.js:186:8 <- test/test_index.js:129181:26

        �[31m✗ �[39m�[31mshould not contain user coordinates if browser doesnt support permission query�[39m
	undefined is not an object (evaluating 'navigator.permissions.query')
	removeQuerySupport@webpack:///test/spec/modules/uolBidAdapter_spec.js:112:46 <- test/test_index.js:129109:46
	webpack:///test/spec/modules/uolBidAdapter_spec.js:195:8 <- test/test_index.js:129190:27
UOL Bid Adapter
    buildRequests
      buildRequest geolocation param
        �[31m✗ �[39m�[31mshould contain user coordinates if (i) DNT is off; (ii) browser supports implementation; (iii) localStorage contains geolocation history�[39m
	TypeError: Unable to get property 'query' of undefined or null reference
	   at grantTriangulation (webpack:///test/spec/modules/uolBidAdapter_spec.js:96:6 <- test/test_index.js:129093:7)
	   at Anonymous function (webpack:///test/spec/modules/uolBidAdapter_spec.js:177:8 <- test/test_index.js:129172:9)

        �[31m✗ �[39m�[31mshould not contain user coordinates if localStorage is empty�[39m
	TypeError: Unable to get property 'query' of undefined or null reference
	   at denyTriangulation (webpack:///test/spec/modules/uolBidAdapter_spec.js:104:6 <- test/test_index.js:129101:7)
	   at Anonymous function (webpack:///test/spec/modules/uolBidAdapter_spec.js:186:8 <- test/test_index.js:129181:9)

        �[31m✗ �[39m�[31mshould not contain user coordinates if browser doesnt support permission query�[39m
	TypeError: Unable to get property 'query' of undefined or null reference
	   at removeQuerySupport (webpack:///test/spec/modules/uolBidAdapter_spec.js:112:6 <- test/test_index.js:129109:7)
	   at Anonymous function (webpack:///test/spec/modules/uolBidAdapter_spec.js:195:8 <- test/test_index.js:129190:9)

@lotani-uolinc
Copy link
Contributor Author

@jsnellbaker, thanks for the review. We are now looking into alternatives for the safari issue.

@lotani-uolinc
Copy link
Contributor Author

@jsnellbaker, as a fix, we disabled geolocation tests for engines that do not implement permission and geolocation APIs.
Feel free to reach if any changes are required.

@jsnellbaker
Copy link
Collaborator

@lotani-uolinc That's fine; it looks like everything is settled.

@jsnellbaker jsnellbaker merged commit a658ae7 into prebid:master Jul 17, 2018
@lotani-uolinc
Copy link
Contributor Author

@jsnellbaker, nice! Thanks for your time.

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.

3 participants