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

modules: Implement SmartRTB adapter and spec. #3575

Merged
merged 2 commits into from
Mar 19, 2019

Conversation

evanmsmrtb
Copy link
Contributor

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

Addition of SmartRTB / smrtb.com prebid module.

  • test parameters for validating bids
{
  bidder: 'smartrtb',
  params: {
    pubId: 123,
    medId: "m_123",
    zoneId": "z_abc"
  }
}

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.

@evanmsmrtb

Thanks for submitting this new adapter.

There was one point of feedback on the code, please take a look when you have the chance.

While trying to test the adapter with the params in the description, I wasn't getting any object response from the server; the call to http://pubs.smrtb.com/json/publisher/prebid completed with a 204 OK.

Below is a copy of the request object that was executed, can you take a look to see if anything is amiss?

{"start_time":1551126396115,"tmax":120,"language":"en-US","site":{"domain":"ap.localhost","iframe":false,"url":null,"https":false,"referrer":"http://ap.localhost:9999/integrationExamples/gpt/hello_world.html?pbjs_debug=true"},"imps":[{"pub_id":123,"med_id":"m_123","zone_id":"z_abc","bid_id":"2ae840036721c5","imp_id":"75fd1f36-d614-4105-bb11-1ebf93de10ec","sizes":[[300,250],[300,600]]}]}

modules/smartrtbBidAdapter.js Outdated Show resolved Hide resolved
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.

Found an additional item that needs to be updated.

modules/smartrtbBidAdapter.js Outdated Show resolved Hide resolved
modules/smartrtbBidAdapter.js Outdated Show resolved Hide resolved
@evanmsmrtb
Copy link
Contributor Author

@jsnellbaker Fixed the for-loop syntax for IE and internalized getDomain(). Please verify.

@jsnellbaker
Copy link
Collaborator

@evanmsmrtb Thanks for making the code updates; those look fine now.

Did you have the chance to look at the issue with test bid not returning? I'm seeing that problem when using the test params on the hello_world.html page.

@evanmsmrtb
Copy link
Contributor Author

Yes, this has now been corrected. You should see sample bids returned with these parameters:

{
            bidder: "smartrtb",
            params: {
                pubId: 123, 
                medId: "m_00a95d003340dbb2fcb8ee668a84fa",
                zoneId: "z_261b6c7e7d4d4985393b293cc903d1"
            }
 }

@evanmsmrtb
Copy link
Contributor Author

@jsnellbaker Please review updated params and for-loop syntax.

@jsnellbaker
Copy link
Collaborator

@evanmsmrtb I apologize for the delay; the code changes do look fine. But I tested with the parameters in the previous comment, but I'm still not getting a response from the server.

The status of the request is (canceled). Below is a copy of the URL and its payload:
http://pubs.smrtb.com/json/publisher/prebid

{"start_time":1551804908474,"tmax":120,"language":"en-US","site":{"domain":"test.localhost","iframe":false,"url":null,"https":false,"referrer":"http://test.localhost:9999/integrationExamples/gpt/hello_world.html?pbjs_debug=true"},"imps":[{"pub_id":123,"med_id":"m_00a95d003340dbb2fcb8ee668a84fa","zone_id":"z_261b6c7e7d4d4985393b293cc903d1","bid_id":"2ccb22d862625f","imp_id":"a61e88a9-d31e-41e9-8fa1-63c775e1852f","sizes":[[300,250]]}]}

Do you see anything incorrect or unexpected in the above?

@evanmsmrtb
Copy link
Contributor Author

@jsnellbaker No problem. It appears you caught us while we were working on parts of our API. Please try again - I have confirmed it is up again and returning bids.

@jsnellbaker
Copy link
Collaborator

@evanmsmrtb I tried again but it's not connecting. I setup a test variant where I disabled the internal timeouts for the auction and on our ajax request to allow the server ample time to respond. However it just resulted in a 522 Origin Connection Time-out error.

I attached a screenshot of the request details/headers/payload from this test. Could the issue with the alias I have setup to run the local server? Are you doing something on the server when any variant of localhost is included for instance?

screen shot 2019-03-07 at 8 47 01 am

@evanmsmrtb
Copy link
Contributor Author

@jsnellbaker We located and fixed what was causing this. Please try again - third time's the charm.

@jsnellbaker
Copy link
Collaborator

@evanmsmrtb Thanks for digging into this. I tried again and verified the ad is delivering successfully.

LGTM

@jsnellbaker jsnellbaker merged commit c0fdf02 into prebid:master Mar 19, 2019
pycnvr pushed a commit to conversant/Prebid.js that referenced this pull request Apr 4, 2019
* modules: Implement SmartRTB adapter and spec.

* Fix for-loop syntax to support IE; refactor getDomain out of exported set.
jacekburys-quantcast pushed a commit to jacekburys-quantcast/Prebid.js that referenced this pull request May 15, 2019
* modules: Implement SmartRTB adapter and spec.

* Fix for-loop syntax to support IE; refactor getDomain out of exported set.
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