Skip to content
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

[AdManager][Banner] An ad is not rendered properly #175

Closed
yoalex5 opened this issue Apr 2, 2019 · 7 comments
Closed

[AdManager][Banner] An ad is not rendered properly #175

yoalex5 opened this issue Apr 2, 2019 · 7 comments

Comments

@yoalex5
Copy link
Collaborator

yoalex5 commented Apr 2, 2019

Type of issue

Bug

Description

When running a standard banner adunit it is not rendered by AdManager SDK.

Steps to reproduce

1 - Follow the Guide to DFP setup
2 - Make a Code Integration for iOS
3 - Setup BannerAdUnit for Google Mobile Ads
4 - Run and check the result. When a banner ad is returned, the rendering fails.

Test config

Host = Appnexus
ServerAccountId = "bfa84af2-bd16-4d35-96ad-31c6bb888df0"
configId = "6ace8c7d-88c0-4623-8117-75bc3f0a2e45"
adUnitID = /5300653/test_adunit_pavliuchyk_300x250_puc_ucTagData_prebid-server.rubiconproject.com

Charles log: ios_Pv1.0_AMv7.42.2_prod_appnexus_rubicon-puc_ucTagData.chls.zip

Expected results

If AdManager response contains an ad it should be rendered

Actual results

A creative is not showed

Platform details

Prebid SDK v 1.0, git hash: beeee28
AdManager v 7.42.2

Other information

@yoalex5 yoalex5 changed the title [AdManager][Banner] is not rendered [AdManager][Banner] is not rendered properly Apr 2, 2019
@yoalex5 yoalex5 changed the title [AdManager][Banner] is not rendered properly [AdManager][Banner] An ad is not rendered properly Apr 2, 2019
@AntoineJac
Copy link
Contributor

I am confirming the issue, the GADBannerView has the correct size but the GADWebAdView is keeping the 1x1 size. The "x-afma-ad-size" header used by the SDK to build the GADWebAdView, this header field is returning 1x1 instead of the real creative size. The other header "X-Afma-Ad-Slot-Size" has the correct size.
It is an issue with the DFP SDK and I raised it to google a few week ago.

I have found a fix using the mraid.resize() in the prebid creative but hope Google could fix it...

@bszekely1
Copy link
Contributor

bszekely1 commented Apr 5, 2019

To add additional details to the issue, Oleksandr who created this ticket has done some analysis on which versions of the Google ads SDK exhibit the failure to resize below. Fields in orange show failure.
Screen Shot 2019-04-05 at 3 09 12 PM
Screen Shot 2019-04-05 at 3 09 21 PM

Oleksandr and I are recommending we add some logic in the universal creative (possibly with MRAID or pure JS) to resize the ad slot to the dimensions of the creative being served in SDK environments.

Is anyone else able to validate this to be an issue?

@bszekely1
Copy link
Contributor

bszekely1 commented Apr 18, 2019

This issue was posted in a Google Forum support page here: Google Groups

If this issue can be validated by others, I would like to get momentum behind the google support post to encourage Google to address the issue. If anyone is able to provide additional details, please post both here and the Google ticket.

@yoalex5
Copy link
Collaborator Author

yoalex5 commented May 10, 2019

As a variant of solution that should be implemented from a publisher side it is using resize approach

iOS
DFPBannerView.resize() function in GADBannerViewDelegate.adViewDidReceiveAd()

For example

func adViewDidReceiveAd(_ bannerView: GADBannerView) {
    print("adViewDidReceiveAd")

    self.dfpBanner.resize(bannerView.adSize)
}

Android
PublisherAdView.setAdSizes() function in AdListener.onAdLoaded()

For Example

dfpAdView.setAdListener(new AdListener() {
    @Override
    public void onAdLoaded() {
        super.onAdLoaded();

        dfpAdView.setAdSizes(dfpAdView.getAdSize());
    }
});

Do not use this approach with multi-size adunit

@ppuviarasu
Copy link
Collaborator

This needs to be documented here http://prebid.org/prebid-mobile/pbm-api/ios/pbm-bannerad-ios.html && http://prebid.org/prebid-mobile/pbm-api/android/banneradunit-android.html to include adManager and the implementation logics like these to address specific mediation partner issues

@AntoineJac
Copy link
Contributor

I have run some tests on iOS and Android for different SDK version and seems to work well.
This solution seems to be the simplest and easy to setup.
Methods used to resize are officially supported and part of Google api doc so it is also safe to go but will need to be removed when Google confirm the issue is fixed!

@bszekely1
Copy link
Contributor

Released in 1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants