Prebid - Index video outstream configuration with multiple playerSize in bidders

122 views Asked by At

I would like to create an adUnit video outstream with multiple playserSizes for Index (documentation there

At first I thought to put the playerSize at the adUnit level, but because I want to define multiple playerSizes, I decided to move it at bidder level in params > video > playerSize. Nonetheless it does not work whereas in the documentation it is written

If you are using Index’s outstream player and have placed the video object at the bidder level, you must include the Index required parameters at the bidder level``` (link above)

Here is my prebid configuration

```javascript
{
    "code": slotCode,
    "sizes": [[1,1],[300,250],[160,600],[300,600],[640,360]],
    "bids": [
        {
            "bidder": "criteo",
            "params": {
                "networkId": networkId,
                "video": {
                    "playerSize": [640, 480],
                    "skip": 0,
                    "playbackmethod": 1,
                    "placement": 1,
                    "mimes": [
                        "video/mp4"
                    ],
                    "maxduration": 30,
                    "api": [
                        1,
                        2
                    ],
                    "protocols": [
                        2,
                        3
                    ]
                }
            },
            "userId": {...},
            "userIdAsEids": [...],
            "crumbs": {...}
        },
        {
            "bidder": "index",
            "params": {
                "siteId": siteId,
                "size": [
                    640,
                    360
                ],
                "video": {
                    "playerSize": [640, 480],
                    "h": 640,
                    "w": 360,
                    "protocols": [
                        2,
                        3,
                        5,
                        6
                    ],
                    "minduration": 5,
                    "maxduration": 30,
                    "mimes": [
                        "video/mp4",
                        "application/javascript"
                    ],
                    "playerSize": [
                        640,
                        360
                    ]
                }
            },
            "userId": {... },
            "userIdAsEids": [...],
            "crumbs": {...}
        }
    ],
    "mediaTypes": {
        "video": {
            "context": "outstream"
        }
    },
    "pubstack": {...}
}

If I use this configuration, I got this error

ERROR: IX Bid Adapter: bid size is not included in ad unit sizes or player size.

Even if my playerSize for index ([640, 360]) is in the adUnit sizes.

I wonder if it is possible for an adUnit to have multiple payerSizes?

1

There are 1 answers

0
Nikos Pilidis On

In the documentation it says it is possible. Like this:

var adUnits = [{
    code: 'video-ad-unit',
    mediaTypes: {
        video: {
            context: 'outstream',
            playerSize: [[640, 480], [300, 250], [400, 300]]
        }
    },
    bids: [{
        // your bidder specifics here
    }]
}];

Notes:

  1. I see a sizes parameter in your setup which I don’t understand what it actually is.
  2. If you still have trouble with IX errors you could try to create 2 adunits with the same code name but different setups https://docs.prebid.org/dev-docs/adunit-reference.html#:~:text=It's%20ok%20to%20have%20multiple,e.g.&text=In%20this%20example%2C%20bidderA%20gets,while%20bidderB%20gets%20only%20banner.