-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SizeConfig and Labels - unexpected behavior? #2043
Comments
@snapwich mind taking a look when you get a chance? |
@rmloveland At a glance I think all your test pages are setting sizeConfig incorrectly. You have If you're still having issues with sizeConfig after that change, let me know and I can dig in further. |
OK, fixing the
This leaves just #4 that I have questions about. In this updated version of test case #4:
Given the above, I would expect "no Is this the expected behavior? |
I think that's expected behavior. We didn't cover the case of the I would rather someone explicitly state that they accept any screen size then have our code assume that to be the case since such a rule (match all screen sizes) isn't very useful in this module. The design doc says "We don't recommend structuring your sizeConfig such that multiple mediaQueries match, but it is possible.", and a rule that matches all would lead to that undesired scenario frequently. It's possible we could throw an error for a missing |
+1 I would definitely be in favor. Then we could update the documentation to note that the |
Type of issue
Bug
Description
I have test pages where
mediaQuery
should match the page size, and thelabelAny
targeting on the ad unit matches thelabels
on thesizeConfig
object, but an ad is not displayed.Steps to reproduce
See cases and links to test pages in the table below.
The table below describes the behavior I've observed around the intersection of media queries, supported ad sizes, and labels targeting. Each case links to a test page showing that case. What I'm seeing seems to contradict the documentation (but it's possibly I am totally misunderstanding how this is supposed to work!)
Based on the above, I have questions:
If the mediaQuery matches the page size, and the labelAny targeting on the ad unit matches the label on the sizeConfig, isn't that supposed to work? Or is it not matching in an obvious way that I'm missing?
As far as I can tell the labels match (they are the same strings), and should fire with labelAny - what am I not seeing?
What is the exact nature of the interaction between labels and media queries? I would imagine they get
AND
ed together? Or?It appears to be the case that if there is an ad that matches the ad unit's size, it doesn't matter if the media query matches and the ad size is not listed in the supported sizes. I think this is what is meant in the docs by
The error message
WARNING: callBids executed with no bidRequests. Were they filtered by labels or sizing?
doesn't really help at all, since there are two interacting features, either of which could be failing to work. Is there some way to trace the operation of the matching and print something that shows me the steps? (AKA a backtrace? (for this mini pattern matching interpreter))Expected results
Ad should serve when
mediaQuery
matches the page size, the ad size is in the list of supported sizes, and thelabelAny
array includes a label from the ad unit.Actual results
Ad does not serve when the above conditions are in place.
The text was updated successfully, but these errors were encountered: