Skip to content

Commit

Permalink
Warning for labels not being filters of sizeConfig
Browse files Browse the repository at this point in the history
Trying to shed a little light on prebid/Prebid.js#3226
  • Loading branch information
benjaminclot authored Nov 13, 2018
1 parent ed1d920 commit 0d5da2c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dev-docs/publisher-api-reference.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---
layout: page
title: Publisher API Reference
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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 %}
Expand Down

0 comments on commit 0d5da2c

Please sign in to comment.