Is it possible to use width 100% in sizemapping?
Closed this issue · 5 comments
Is it possible to set the width to 100% in sizemapping?
like this for example:
ad_sizes: [100% , 60]
Hi, the values are just passed on to the gpt. They only support fixed sizes, not percentages.
The size is used by DFP to pick wich ad to show, but you cant upload an 100% wide ad.
On 29/01/2015, at 10.53, Mark Theis Madsen notifications@github.com wrote:
Is it possible to set the width to 100% in sizemapping?
like this for example:
ad_sizes: [100% , 60]—
Reply to this email directly or view it on GitHub.
I don't think you can do that, its not a limitation of my plugin... but a limitation of DFP itself... this page seems to only mention actual numbers not percentages: https://support.google.com/dfp_premium/answer/3423562?hl=en
hmm okay. I see.
I only use dfp together with adsense because I use it on an ajax website.
Initially I set up the sizemapping wrong and I noticed that it loaded adsense sizes that I didn't set in dfp.
So it seems to me that dfp together with adsense will load whatever size ad that fits.
This is probably more of a bug on googles side, but if jquery.dfp read the width of the container and passed that on to gpt. It would load the best sized adsense ad possible.
Could that be true?
Yes I think adsense will load the biggest ad it can for the ad slot, so you could detect the size of the adslot before loading dfp and then make the size mapping set to the size of the adslot rather than 100%
Cool. I'll do that then. Thanks for the help.
And you should maybe include the information about the size mapping attribute in the div tag. Found the info in a github issue :)