Skip to content

Outcon bid adapter.#4161

Merged
jsnellbaker merged 35 commits intoprebid:masterfrom
TinchoF:master
Oct 8, 2019
Merged

Outcon bid adapter.#4161
jsnellbaker merged 35 commits intoprebid:masterfrom
TinchoF:master

Conversation

@TinchoF
Copy link
Contributor

@TinchoF TinchoF commented Sep 5, 2019

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

@bretg
Copy link
Contributor

bretg commented Sep 5, 2019

Docs PR prebid/prebid.github.io#1461

@jsnellbaker jsnellbaker self-requested a review September 9, 2019 16:53
@jsnellbaker jsnellbaker self-assigned this Sep 9, 2019
@jsnellbaker
Copy link
Collaborator

@TinchoF Can you please put together some unit tests for this new adapter?

The following link can provide some direction if needed (or feel free to look at the unit test files for other adapters as a reference):
http://prebid.org/dev-docs/bidder-adaptor.html#adding-unit-tests

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 @TinchoF

Thanks for putting together the unit tests. I ran an initial test of the adapter using test values in the .md file.

Based on that attempt, there are a few items in the code here that should be reviewed again.

Can you please take a look and make the requested changes? If you have any questions, please let me know and I'll be happy to help.

Thanks!
-Jason

{
pod: "5beeb24a306ea47660632043",
internalId: "12345678",
publisher: "5beeb1fd306ea4779e464532"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please update this example text to follow a proper adUnit? For example:

var adUnits = [{
  code: 'test-adUnit',
  mediaTypes: { banner: { sizes: [[300, 250], [300, 600]] } },
  bids: [{
    bidder: 'outcon',
    params: {
      pod: '5beeb24a306ea47660632043',
      internalId: '12345678',
      publisher: '5beeb1fd306ea4779e464532'
    }
  }]
}];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the ad unit format, our clients show programmatic advertising in PODs (points of display) that we have in our database, upon receiving the POD id or the publisher ID + Internal ID, we access all the data to deliver the ad appropriately (resolution, size, mimes, audience, etc.)

@@ -0,0 +1,41 @@
import {registerBidder} from '../src/adapters/bidderFactory';
import {config} from '../src/config';
const BIDDER_CODE = 'outcom';
Copy link
Collaborator

Choose a reason for hiding this comment

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

The value here is outcom while the adapter name is outcon. The primary name of the bidder should match the name of the file(s) used in Prebid.

Can you please update this value (if that's where the typo is)?

const BIDDER_CODE = 'outcom';
export const spec = {
code: BIDDER_CODE,
aliases: ['outcom'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you have the same name as the value for your BIDDER_CODE, this alias property doesn't need to be defined. This should only be used when you have a different name.


buildRequests: function(validBidRequests) {
let par = '';
if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The validBidRequests is an array of potential bid requests to your adapter (in case the publisher has you listed in multiple adUnit objects on their page).

Can you please update the internal logic in this function to access the array? It's currently throwing undefined errors.

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

Comments