-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Support LCD amp-ad in multi-size #8254
Conversation
This check makes it only possible to do a GCD size for the primary unit. Without the ability to put a creative wrapper on AdX we cannot resize the container back down to 300x250. By removing this requirement we can set the default size to 300x250 for AdX support and allow the amp-ad container to resize up for direct sold sponsorship larger ad sizes. The container will only resize downward when BTF so there is no negative effect on user experience that I've seen. Perhaps a better way to solve this is to include a new attribute in the amp-ad tag that allows for this option as an override. Thanks Sam smansour@hearst http://localhost:8000/examples/HDM-Superhero.max.html
Hi, ampproject bot here! Here are a list of the owners that can approve your files. You may leave an issue comment stating "@ampprojectbot retry!" to force me to re-evaluate this Pull Request's status /to ampproject/a4a
/to camelburrito lannka
For any issues please file a bug at https://github.com/google/github-owners-bot/issues |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
/cc @ampproject/a4a |
Removed whitespace
CLAs look good, thanks! |
removed whitespace |
I'm not sure I understand the use case here. Could you clarify under what circumstances we would want the ad slot to expand rather than contract? I'd be more comfortable if @jasti commented on this, as he was the one who formulated the size restrictions. |
@smansour What we want to avoid, when above the fold, returning a larger size back when the AMP runtime has only reserved a smaller space. |
@jasti Sorry for the late response. The main issue is that our direct sold / sponsored content comes with an ad unit that is 320x450. We can add a creative wrapper in DFP to all these units to call "window.parent.context.requestResize(%%WIDTH%%,%%HEIGHT%%);" However, the vast majority of AdX creatives are simply 300x250 units and we don't have the ability in those units to size down the 320x450 container via a creative wrapper...this puts us in an unfortunate situation where we can't run our sponsorship creative while not causing major whitespace issues. If we could have a default container of 300x250 that is able to size up to 320x450 when needed we solve the problem. I haven't checked 728x90 since it's my understanding this is mobile only and we don't run 728x90's on mobile. For that matter we don't run them on our desktop viewport either. 970x90 is the smallest size we support. Please advise. |
@smansour But what is your desired behavior when your 320x450 ad unit is served into a 300x250 slot that is in the viewport? AMP won't let it resize while visible, and surely you don't want it to render truncated! The smaller-sizes-only restriction is basically the acknowledgement that whitespace may be ugly, but it's less bad than rendering a truncated creative in this situation. |
@michaelkleber the ad slot where the 320x450 mobile ad loads is BTF so in my testing it always is able to resize before it enters the viewport. It would be good to have a fallback in case the user scrolled so fast that container was in view before the ad had a chance to load...not sure what the best solution for that specific scenario would be. Thoughts? |
@michaelkleber's right. This is exactly the situation we didn't have an answer for in the AMP framework. Truncated ads are a no go from an advertiser's perspective. |
This check makes it only possible to do a GCD size for the primary
unit. Without the ability to put a creative wrapper on AdX we cannot
resize the container back down to 300x250.
By removing this requirement we can set the default size to 300x250 for
AdX support and allow the amp-ad container to resize up for direct sold
sponsorship larger ad sizes. The container will only resize downward
when BTF so there is no negative effect on user experience that I've
seen.
Perhaps a better way to solve this is to include a new attribute in the
amp-ad tag that allows for this option as an override. Thanks Sam
smansour@hearst
http://localhost:8000/examples/HDM-Superhero.max.html
Please pick a meaningful title for your pull request using sentence case.
Do not overuse punctuation in the title like
(chore):
. If it is helpful feel free to start with a project name, though, likeProjectX: Implement some feature
.Title instructions above.
Enter a succinct description of what is achieved by the PR. Ideally describe why the change is being made.
Bullet points like
really help with making this more readable.
Fixes/Closes/Related-to #1 (enter issue number, except in rare cases where none exists).