From 0d5da2ca773b573c04c2a14969fa5ecfa378a38f Mon Sep 17 00:00:00 2001 From: Benjamin Clot Date: Tue, 13 Nov 2018 11:28:59 +0100 Subject: [PATCH] Warning for labels not being filters of sizeConfig Trying to shed a little light on https://github.com/prebid/Prebid.js/issues/3226 --- dev-docs/publisher-api-reference.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dev-docs/publisher-api-reference.md b/dev-docs/publisher-api-reference.md index 67310fa623..1c6ec4cf8d 100644 --- a/dev-docs/publisher-api-reference.md +++ b/dev-docs/publisher-api-reference.md @@ -1,3 +1,4 @@ + --- layout: page title: Publisher API Reference @@ -1631,6 +1632,15 @@ To set size configuration rules, pass in `sizeConfig` as follows: pbjs.setConfig({ sizeConfig: [{ + 'mediaQuery': '(min-width: 1600px)', + 'sizesSupported': [ + [1000, 300], + [970, 90], + [728, 90], + [300, 250] + ], + 'labels': ['desktop-hd'] + }, { 'mediaQuery': '(min-width: 1200px)', 'sizesSupported': [ [970, 90], @@ -1692,6 +1702,9 @@ Only one conditional may be specified on a given AdUnit or bid -- if both `label {: .alert.alert-warning :} If either `labeAny` or `labelAll` values is an empty array, it evaluates to `true`. +{: .alert.alert-warning :} +It is important to note that labels do not act as filters for sizeConfig. Using a screen of 1600px wide, the example above and `labelAll:["desktop"]` will *not* filter out sizes defined in the `desktop-hd` sizeConfig. + Label targeting on the ad unit looks like the following: {% highlight js %}