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

Opera Ads Bid Adapter: add new bid adapter #7152

Merged
merged 9 commits into from
Jul 19, 2021
Merged

Conversation

xingwangl
Copy link
Contributor

@xingwangl xingwangl commented Jul 8, 2021

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

Add Opera Ads bid adapter.

  • test parameters for validating bids
{
  bidder: 'operaads',
  params: {
    placementId: 's5340077725248',
    endpointId: 'ep3425464070464',
    publisherId: 'pub3054952966336'
  }
}

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

Done, tested with the Hello World page.

Email: [email protected]

Docs: prebid/prebid.github.io#3092

@musikele
Copy link
Contributor

musikele commented Jul 9, 2021

Hi @xingwangl ,
In order to be approved, we require at least 80% code coverage.
Currently this bidder has only 44% code coverage.
You can run coverage with:

npx gulp test-coverage 

and then view the coverage by launching

npx gulp view-coverage

@musikele
Copy link
Contributor

musikele commented Jul 9, 2021

@xingwangl

Trying to run the bidder with hello_world.html test page, I'm getting CORS error - is there anything special I have to do to test the bidder?
image

@xingwangl

This comment has been minimized.

@xingwangl
Copy link
Contributor Author

Oh, I found you are using wrong parameters. Try these:

{
  bidder: 'operaads',
  params: {
    placementId: 's5340077725248',
    endpointId: 'ep3425464070464',
    publisherId: 'pub3054952966336'
  }
}

@ChrisHuie ChrisHuie changed the title feat(operaads): add Opera Ads bid adapter Opera Ads Bid Adapter: add new bid adapter Jul 12, 2021
@ChrisHuie ChrisHuie removed the minor label Jul 12, 2021
@xingwangl
Copy link
Contributor Author

2021-07-1241 23

Hi @musikele , I updated the test units, now it has a code coverage above 90%.

@yuansi-piao
Copy link
Contributor

Hi @musikele, Please continue reviewing when you are available, thanks.

@musikele
Copy link
Contributor

Hey @yuansi-piao , the test codes you gave me in the previous comment will work also for video and native?

@xingwangl
Copy link
Contributor Author

Hi @musikele, the placement id is also for native and video ad.

There are some test code I used to test the ads:

Instream video:

var videoAdUnit = {
  code: 'video1',
  mediaTypes: {
    video: {
      context: 'instream',
      playerSize: [640, 480],
      mimes: ['video/mp4'],
      protocols: [1, 2, 3, 4, 5, 6, 7, 8],
      playbackmethod: [2],
      skip: 1
    }
  },
  bids: [{
    bidder: 'operaads',
    params: {
      placementId: 's5340077725248',
      endpointId: 'ep3425464070464',
      publisherId: 'pub3054952966336'
    }
  }]
};

pbjs.que.push(function () {
  pbjs.addAdUnits(videoAdUnit);
  pbjs.setConfig({
    debug: true,
    userSync: {
      userIds: [{
        name: 'sharedId',
        storage: {
          name: '_sharedID',
          type: 'cookie',
          expires: 30
        }
      }]
    },
    cache: {
      url: 'https://prebid.adnxs.com/pbc/v1/cache'
    }
  });

native:

var adUnits = [{
  code: 'native',
  sizes: [
    [360, 360]
  ],
  mediaTypes: {
    native: {
      title: {
        required: true
      },
      image: {
        required: true
      },
      sponsoredBy: {
        required: true
      }
    }
  },
  bids: [{
    bidder: 'operaads',
    params: {
      placementId: 's5340077725248',
      endpointId: 'ep3425464070464',
      publisherId: 'pub3054952966336'
    }
  }]
}];

pbjs.que.push(function () {
  pbjs.setConfig({
    debug: true,
    userSync: {
      userIds: [{
        name: 'sharedId',
        storage: {
          name: '_sharedID',
          type: 'cookie',
          expires: 30
        }
      }]
    }
  });

Copy link
Contributor

@musikele musikele left a comment

Choose a reason for hiding this comment

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

LGTM.

For future reviews, add the working test params in the .md file so it's easier to find them.

@musikele musikele merged commit 7e95a31 into prebid:master Jul 19, 2021
@musikele musikele added the minor label Jul 19, 2021
@xingwangl xingwangl deleted the operaads branch July 29, 2021 07:11
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.

4 participants