Some of the banner ads have wrong bounds

133 views
Skip to first unread message

Amir Rezvani

unread,
Jul 14, 2020, 5:49:08 PM7/14/20
to Google Mobile Ads SDK Developers
Hi all,

I've started experiencing some of the banner ads to go above their container frame.
This is how it looks like below:
You can clearly see that the frame is correct but the internal content of BannerAd has wrong content offset.
Any help is appreciated.
Thanks.

Screen Shot 2020-07-14 at 2.46.32 PM.png 

Mobile Ads SDK Forum Advisor Prod

unread,
Jul 14, 2020, 11:51:55 PM7/14/20
to a.h.r...@gmail.com, google-adm...@googlegroups.com
Hi Amir,

Thank you for reaching out to us. Allow me to assist you in this.

As per checking with the screenshot, it appears that the creative came from a third-party ad network. Could you confirm if you're using a mediation network? If so, what mediation network are you using?

In addition, could you confirm if the behavior occurs on a specific creative? If so, could you kindly provide a Charles log (see instructions here) capturing the behavior? 

Please use the Reply privately to author option to share the details privately. 

Regards,
Teejay Pimentel
Mobile Ads SDK Team

ref:_00D1U1174p._5004Q21lpi2:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Jul 15, 2020, 4:11:01 PM7/15/20
to a.h.r...@gmail.com, google-adm...@googlegroups.com
Hi Amir,

I work with Teejay and will try to assist you. Thank you for giving us a Charles log of the offset Creative. I was able to track down the creative and load it in a Chrome browser and found that the body of the creative is 268 pixels tall as seen in the screenshot. The slotsize set for the ad is 300 wide by 250 high. The image itself could be the right height yet the body could be bigger depending on measurements and templates used by the creative. This is a problem that has surfaced since Apple has recommended using WKWebView instead of UIWebView in apps. We have seen this problem where creatives that would appear correctly in UIWebView even with added pixels will not necessarily appear in WKWebView correctly. The problem is that the creative is too tall for the slot. GMA SDK had moved from UIWebView to WKWebView in 7.55.0, and in WKWebView sometimes the scroll bar doesn't start all the way at the top, thus seeing the cut off. Unfortunately we don't have any control over how WKWebView behaves. 

We have also seen viewability measurements added to the creative that made the ad bigger.

A simple test for this issue is to isolate a creative with a line item for an ad unit Id, then add the Id to our sample banner app and resizing the view to correct height. You will be able to use Safari developer features to see the size of the returned html of the ad.

As per why the issue is not reliably reproducible, it's because it seems to be a race condition with WKWebView as to whether the scroll starts at the top or not, but not scrolled down 100% of the time. The best guess is that when content is loaded dynamically the web view scrolls down to it, and the tracking pixels for example seem to be loaded dynamically.

A solution could be to contact the owner of the creative and have them update the creative to render at the correct size. They can be told that Google updated the Ad Manager creative templates to not generate any extra pixels. So if they use the Ad Manager default templates and don't add to the height with other viewability pixels of their own they should be fine. We are working on fixing the Campaign Manager templates to not have extra pixels. The latest I heard is that 20% of all traffic randomly is using the new templates and the expectation soon is to ramp up to 100%.

Another solution could be to downgrade your SDK version to 7.53.1 where we aren't using WKWebView. Updates to App Store apps with UIWebView are accepted until December, 2020. There are known tradeoffs with this approach though, but I have heard that a surprise benefit is that you can may be able to avoid a battery draining issue that started happening with WKWebView in background in iOS 13.5.1.

Kind regards,
Aryeh Baker

Mobile Ads SDK Team
 

ref:_00D1U1174p._5004Q21lpi2:ref
Screen Shot 2020-07-15 at 3.11.49 PM.png
Reply all
Reply to author
Forward
0 new messages