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

Cleanmedianet: Add cleanmedianet bidder adapter #3582

Merged

Conversation

sa1omon
Copy link
Contributor

@sa1omon sa1omon commented Feb 23, 2019

Type of change

[X] New bidder adapter

Description of change

Added cleanmedianet as a new bidder adapter

var adUnits = [
    // Banner adUnit
   {
     code: 'banner-div',
     sizes: [[300, 250]],
     bids: [{
       bidder: 'cleanmedianet',
       params: {
          // ID of the supply partner you created in the Clean Media Net dashboard
         supplyPartnerId: '1253',
          // OPTIONAL: custom bid floor
         bidfloor: 0.01,
          // OPTIONAL: if you know the ad position on the page, specify it here
         //           (this corresponds to "Ad Position" in OpenRTB 2.3, section 5.4)
         //adpos: 1,
          // OPTIONAL: whether this is an interstitial placement (0 or 1)
         //           (see "instl" property in "Imp" object in the OpenRTB 2.3, section 3.2.2)
         //instl: 0
       }
     }]
   },
    // Video outstream adUnit
   {
     code: 'video-outstream',
     sizes: [[300, 250]],
     mediaTypes: {
       video: {
         context: 'outstream',
         playerSize: [300, 250]
       }
     },
     bids: [ {
       bidder: 'cleanmedianet',
       params: {
          // ID of the supply partner you created in the dashboard
         supplyPartnerId: '1254',
          // OPTIONAL: custom bid floor
         bidfloor: 0.01,
          // OPTIONAL: if you know the ad position on the page, specify it here
         //           (this corresponds to "Ad Position" in OpenRTB 2.3, section 5.4)
         //adpos: 1,
          // OPTIONAL: whether this is an interstitial placement (0 or 1)
         //           (see "instl" property in "Imp" object in the OpenRTB 2.3, section 3.2.2)
         //instl: 0
       }
     }]
   }
];

@sa1omon sa1omon mentioned this pull request Feb 23, 2019
1 task
@mike-chowla mike-chowla self-assigned this Feb 23, 2019
@mike-chowla mike-chowla self-requested a review February 23, 2019 18:57
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 update to use the passed in url & utils url parsing function

import { BANNER, VIDEO } from '../src/mediaTypes';

export const helper = {
getTopFrame: function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use bidderRequest.refererInfo for getting the url
http://prebid.org/dev-docs/bidder-adaptor.html#bidrequest-parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

startsWith: function(str, search) {
return str.substr(0, search.length) === search;
},
getTopWindowDomain: function(url) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use utils.parse for extracting the hostname from the url

export function parse(url, options) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@sa1omon
Copy link
Contributor Author

sa1omon commented Feb 25, 2019

Please update to use the passed in url & utils url parsing function

Hi @mike-chowla,
I have updated the code according to your insights.
Waiting for your update.
Thanks

@mike-chowla mike-chowla merged commit edf6f40 into prebid:master Feb 26, 2019
@bretg
Copy link
Collaborator

bretg commented Mar 2, 2019

docs PR prebid/prebid.github.io#1134

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