amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Double-click multiSize restrictions

Open eduardcotmrf opened this issue 9 years ago • 10 comments

Right now the amp-ad doubleclick implemention restricts multisize based on height and width, giving you an error in the console if the width it's bigger than the previous.

For example:

screen shot 2017-04-21 at 16 55 20

In our case it's very common to have configurations like 300x250,320x50 for example. The height it's always decreasing as especified in https://github.com/ampproject/amphtml/blob/master/ads/google/doubleclick.md but there are small fluctuations in the width.

We think it would be interesting to support that in AMP, as the real problem in the user experience it's height fluctuation, but not width fluctuation.

We can prepare a PR for this change, do you think it would be interesting?

eduardcotmrf avatar Apr 21 '17 15:04 eduardcotmrf

@eduardcotmrf have you considered setting the primary size to 320x250? if what's returned is a 300x250, it's just centered anyway?

jasti avatar Apr 21 '17 17:04 jasti

@jasti This is not possible as we are trying to get from adex ads in the standard sizes or the ones that generate more revenue for our clients. It's not the same requesting a 320x250 than a 300x250, as the last tag is more popular and mostly used within the industry.

eduardcotmrf avatar Apr 24 '17 07:04 eduardcotmrf

cc/ @ampproject/a4a @eduardcotmrf to be clear, you're saying that you actually get less demand from AdX if you specify 320x250 than 300x250?

keithwrightbos avatar Apr 24 '17 17:04 keithwrightbos

I'm saying that asking for a 320x250 gets diferent advertisement than asking for a 300x250. You can see here that 320x250 it's not a standard size and 300x250 it's the top performer: https://support.google.com/adsense/answer/6002621?hl=en

eduardcotmrf avatar Apr 25 '17 06:04 eduardcotmrf

Unfortunately, you cannot actually guarantee changing the width will not potentially trigger reflow because it is possible the publisher is using float for their layout. However, I still don't understand why you cannot indicate a primary size of 320x250 with 300x250 as a possible multi-size?

keithwrightbos avatar Apr 25 '17 18:04 keithwrightbos

As far as I am aware, the ad returned is not biased toward the primary dimensions. So setting the primary width and height to their largest respective values and adding the others to the multi-size attribute should accomplish what you're trying to do.

glevitzky avatar Apr 25 '17 18:04 glevitzky

The problem it's that I cannot have 300x250 and 320x50 in the same multisize array because one has bigger width and the other bigger height.

eduardcotmrf avatar Apr 26 '17 07:04 eduardcotmrf

@eduardcotmrf I think the suggestion is to use the artificial size 320x250 as the width/height of the ad unit (to reserve the full space needed for either ad), and then have both 300x250 and 320x50 in the data-multi-size array.

michaelkleber avatar Apr 26 '17 13:04 michaelkleber

Ok, thanks! Sorry I didn't undertand that. I'll try it and report back. Thanks!

eduardcotmrf avatar Apr 26 '17 13:04 eduardcotmrf

It Works setting the primary size with maxWidth and maxHeight and the array with the real sizes.

Thanks!

eduardcotmrf avatar Apr 27 '17 08:04 eduardcotmrf