prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.33k stars 2.08k forks source link

Conditional adUnit does not work in prebid video #5417

Closed fcurti closed 4 years ago

fcurti commented 4 years ago

Type of issue

BUG or Feature request

Description

The configuration of prebid video bidders using labelAny does not work. The customSizeConfig is loaded in prebid

customSizeConfig:[ { 'mediaQuery': '(min-width: 1025px)', 'sizesSupported': [ [1800,1000],[1200,90],[970,250],[970,90],[728,90],[640,480],[300,600],[300,250],[100,200],[1,1] ], 'labels': ['desktop'] }, { 'mediaQuery': '(min-width: 766px) and (max-width: 1024px)', 'sizesSupported': [ [728,90],[640,480],[300,600],[300,250],[100,200],[1,1] ], 'labels': ['tablet'] }, { 'mediaQuery': '(min-width: 320px) and (max-width: 765px)', 'sizesSupported': [ [640,480],[300,600],[300,250],[300,50],[320,50],[320,100],[100,200],[1,1] ], 'labels': ['mobile'] } ]

The prebid video configuration has the labelAny setted

{ bidder : 'improvedigital', labelAny : [ 'desktop' ], params : { placementId : thePlacementValueForDesktop } }, { bidder : 'improvedigital', labelAny : [ 'tablet', 'mobile' ], params : { placementId : thePlacementValueForTabletMobile } },

Steps to reproduce

Go to https://video.virgilio.it/ using desktop, check the prebid requests of some bidders. The placementId of prebid request contains also the mobile placement id.

Test page

https://video.virgilio.it/

Expected results

Conditional adUnit should work fine also in prebid video

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Fawke commented 4 years ago

Hi @fcurti,

Can you please provide a test page, currently, I'm not able to reproduce the behaviour that you're talking about by visiting https://video.virgilio.it/.

As far as I know, label should conditionally filter out the bidders which fail the label check, and this works for video as well. You can also try the new Advanced Size Mapping module, which makes this sort of setup a lot more intuitive.

fcurti commented 4 years ago

Hi @Fawke, here you can find a test page with 2 placement AppNexus configured: one is for Desktop (labelAny: 'desktop') one is for Tablet/Mobile (labelAny: 'tablet, mobile') https://www.iolam.it/test/video/appnexus.html

Filtering for "ib.adnxs.com" on Network panel and navigate the "tag" object on Request Payload for this resource you wil find 2 configured Placement (1 for desktop, 1 for tablet mobile)

I would expect to see only one tag on request Payload depending on device in use

Fawke commented 4 years ago

Hi @fcurti,

I was able to reproduce the behaviour you're talking about. It seems that the "built in" sizeConfig feature in Prebid.js is limited and only works with banner mediaType and hence, you are not able to filter the bidders based on labels.

For your use case, a new add-on module, Advanced Size Mapping is ideally suited.

For example, if I convert the adUnit you've given the description to use Advanced Size Mapping, it'll look like this:

adUnits = [{
  code: 'ad-unit-1',
  mediaTypes: {
    video: {
      playerSize: [640, 480]
    }
  },
  bids: [{
    bidder: 'improvedigital',
    sizeConfig: [
      { minViewPort: [0, 0], relevantMediaTypes: ['none'] },
      { minViewPort: [1025, 0], relevantMediaTypes: ['video'] }
    ],
    params: {
       placementId : thePlacementValueForDesktop
    }
  }, {
   bidder: 'improvedigital',
   sizeConfig: [
     { minViewPort: [0, 0], relevantMediaTypes: ['none'] },       // between 0px and 320px, don't there is no relevant media type, hence, this bidder won't participate
     { minViewPort: [320, 0], relevantMediaTypes: ['video'] },    // between 320px and 1025px, we have "video" set as the relevant media type, hence this bidder will participate in the auction
     { minViewPort: [1025, 0], relevantMediaTypes: ['none'] }     // 1025px +, there is no active media type, so disable this bidder
   ],
   params : {
     placementId : thePlacementValueForTabletMobile
   }
  }]
}]

You can refer the documentation over here (Ctrl + f, "Using the Advanced Size Mapping Approach for Different Bidder Params")

Let me know if you have any questions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bretg commented 4 years ago

I updated the docs to clarify that sizeConfig is banner-only. https://github.com/prebid/prebid.github.io/pull/2191