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

Add sspBC adapter #5531

Merged
merged 8 commits into from
Aug 24, 2020
Merged

Add sspBC adapter #5531

merged 8 commits into from
Aug 24, 2020

Conversation

wojciech-bialy-wpm
Copy link
Contributor

@wojciech-bialy-wpm wojciech-bialy-wpm commented Jul 22, 2020

Type of change

  • New bidder adapter

Description of change

Add bidder adapter used by Wirtualna Polska Media and it's partners

  • test parameters for validating bids
   {
      code: 'banner-div',
      mediaTypes: {
        banner: {
          sizes: [[970,300],
                        [750,300],
                        [750,200],
                        [750,100],
                        [300,250]]
        }
      },
      bids: [{
         bidder: 'sspBC',
         params: {
                    id: '003',
                    siteId: '235860',
                    test: 1          
         }
       }]
   }

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:

width: serverBid.w,
height: serverBid.h,
bidderCode: BIDDER_CODE,
mediaType: 'banner',
Copy link
Collaborator

Choose a reason for hiding this comment

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

please create meta.advertiserDomains

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood! I've looked into it, and while our JSON endpoint does not return bid metadata, it should be available server-side (as underlying logic is using openRTB protocol).

I've created a change request, will update adapter & pull request once it's done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adapter & test have been updated, bids now have meta.advertiserDomains property:
meta: { advertiserDomains: serverBid.adomain, },

@mike-chowla
Copy link
Contributor

mike-chowla commented Jul 29, 2020

I'm not getting a test bid back

Request URL: https://ssp.wp.pl/bidder/?cs=true&bdver=4.4&pbver=3.27.0-pre&inver=0
Request Body
{"id":"b05ddc9f-742a-4f23-aed3-4bbd67ffd1cd","site":{"id":"235911","page":"http://mike3.pubmatic.com:9999/integrationExamples/gpt/hello_world.html","domain":"mike3.pubmatic.com"},"imp":[{"id":"005","banner":{"format":[{"w":300,"h":250},{"w":300,"h":600}],"id":"2dd143f2e116ad"},"tagid":"005"}],"tmax":450,"user":{"data":[{"id":"12","name":"NetInfo","segment":[{"name":"CH-Ect","value":"4g"},{"name":"CH-Rtt","value":"100"},{"name":"CH-Downlink","value":"5.7"},{"name":"CH-Dpr","value":"1"},{"name":"CH-ViewportWidth","value":"1787"}]}]},"regs":{}}

Wojciech Biały added 2 commits August 4, 2020 09:27
@wojciech-bialy-wpm
Copy link
Contributor Author

"Not getting a test bid back" - this has been resolved. The was an issue with DSP not sending test ad. We're now enforcing test demand by adding test: 1 to bid parameters:
"bids": [{ "bidder": "sspBC", "params": { "id": "003", "siteId": "235860", "test": 1 } }],

I've created two simple test pages:

@mike-chowla
Copy link
Contributor

I'm still not getting a bid back. Here's the request body:

{"id":"3b57cb24-323e-47c8-aefb-a71f215d4d33","site":{"id":"235860","page":"http://mike3.pubmatic.com:9999/integrationExamples/imac/hello_world.html?pbjs_debug=true","domain":"mike3.pubmatic.com"},"imp":[{"id":"003","banner":{"format":[{"w":300,"h":250},{"w":300,"h":600}],"id":"2728ae76cdde47"},"tagid":"003"}],"tmax":450,"user":{"data":[{"id":"12","name":"NetInfo","segment":[{"name":"CH-Ect","value":"4g"},{"name":"CH-Rtt","value":"50"},{"name":"CH-Downlink","value":"10"},{"name":"CH-Dpr","value":"2"},{"name":"CH-ViewportWidth","value":"1787"}]}]},"regs":{},"test":1}

@wojciech-bialy-wpm
Copy link
Contributor Author

@mike-chowla

Regarding not getting a bid back: The adapter accepts gdpr-compliant requests only. It will not forward any requests that do not have consent for vendor BusinessClick (vendor Id 676), and purposes 1 & 3.
This, unfortunately, overrides any test settings.

In above case, gdpr data is not supplied, and therefore request is not sent to SSPs.

Could You append GDPR data to the request? If You want, You can use this javascript snippet, that will set up IAB v1 compliant cmp API:
https://bdr.wpcdn.pl/tests/static_cmp.js

We can change the logic (so that test requests will be sent regardless of gdpr status), but this might take some time.

@patmmccann
Copy link
Collaborator

Why don't you hard code a consent string into your unit tests

@wojciech-bialy-wpm
Copy link
Contributor Author

@patmmccann Thank You, good idea!

I've added two more tests, that will perfrom xhr call to our json endpoint. One with test settings & hardcoded consent, one with same settings but no gdpr.

Copy link
Contributor

@mike-chowla mike-chowla left a comment

Choose a reason for hiding this comment

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

Please remove XHR from tests

const requestSingleTestNoGDPR = spec.buildRequests(bids_test, bidRequestTestNoGDPR);

it('should return test ad when request is made with test:1 and gdpr data', function (done) {
const xhr = new XMLHttpRequest();
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be no XHR or network requests in your tests. Our tests will never pass if we are reliant on 250 vendor endpoints to be working. All responses should be mocked in the test frame.out

});

it('should return no ads for request without gdpr, regardless of test settings', function (done) {
const xhr = new XMLHttpRequest();
Copy link
Contributor

Choose a reason for hiding this comment

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

See above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mike-chowla I've removed ajax tests. I have left bidRequestTest and bidRequestTestNoGDPR, which should provide configs that

  • always receive one test ad (bidRequestTest)
  • never receive test ad, due to the lack of GDDPR (bidRequestTestNoGDPR)

Could You use config provided in bidRequestTest and check if you're getting a bid response?

@patmmccann
Copy link
Collaborator

@patmmccann Thank You, good idea!

I've added two more tests, that will perfrom xhr call to our json endpoint. One with test settings & hardcoded consent, one with same settings but no gdpr.

Sorry, Mike makes a good point, my mistake.

Update sspbc-adapter branch
@wojciech-bialy-wpm
Copy link
Contributor Author

sspbc-adapter branch has been updated

Update sspbc-adapter branch
@wojciech-bialy-wpm
Copy link
Contributor Author

@mike-chowla

I've updated sspbc-adapter branch - it should now incorporate all commits from Prebid.js/master as of 24.8.2020 08:40 GMT

Is there anything else that needs to be updated?

@mike-chowla mike-chowla merged commit 29bd8de into prebid:master Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants