Tag Archives: ad_manager

Take the 2023 Google Mobile Ads SDK developer survey

Today, we’re excited to announce the launch of our 2023 Google Mobile Ads SDK Developer Survey. As part of our efforts to continue updating the AdMob and Ad Manager products, we’d like to hear from you about where we should focus our efforts. This includes product feedback as well as feedback on our guides, code samples and other resources. Your feedback will help shape our future product and resource roadmap.

Take the survey

This anonymous survey should only take about 15 minutes to complete and will provide our team with your valuable feedback as we plan for the months ahead. Whether you’re an engineer, Ad Ops personnel, or a PM, your feedback on AdMob, Ad Manager, and the Google Mobile Ads SDK is valuable to us. We appreciate you taking the time to help improve our developer experience!

Announcing iOS Google Mobile Ads SDK Version 10.0.0

We are excited to announce the release of our newest version of the Google Mobile Ads SDK. We recommend upgrading as soon as possible to stay up-to-date with our latest features.

Version 10.0.0 Changes

Google Mobile Ads SDK version 10.0.0 introduces a few major changes:

  • The minimum OS version has been bumped from 11 to 12. Given the high adoption rate of iOS 16, we are continuing the trend of incrementing the minimum support level. Applications can still be built for iOS 11, however, the SDK will not load any ads on iOS 11.
  • Since bitcode is deprecated in Xcode 14, we have disabled bitcode in the SDK. As a result, this has decreased the download size of our SDK by ~35MB. What this means for you is to integrate with SDK version 10.0.0, you also have to disable bitcode (if you haven’t already) in the build settings of your Xcode project.
  • Ad Manager applications require an app ID upon initialization of the SDK. This also means the key GADIsAppManagerApp will no longer bypass this check. App IDs are added to the Info.plist with a key of GADApplicationIdentifier. See Update your Info.plist for more details.
  • Ad Manager applications require GoogleAppMeasurement.xcframework as a dependency. If you install the Google Mobile Ads SDK through CocoaPods or Swift Package Manager, no additional action is required. If you install frameworks manually, see Manual Download for more details.
  • We also have removed deprecated APIs of various properties and classes.

For the full list of changes, check the release notes. Check our migration guide to ensure your mobile apps are ready to upgrade.

SDK Deprecation Reminder

Per the deprecation schedule announced last year, the release of version 10.0.0 means that:

  • iOS Google Mobile Ads SDK versions 8.x.x is officially deprecated, and will sunset in Q2 2024.
  • Versions 7.x.x and below will sunset sometime in Q2 2023, approximately 60 days following the release of Android Google Mobile Ads SDK major version 22.0.0.

As always, if you have any questions or need additional help, contact us via the forum.

Announcing a deprecation schedule for the Google Mobile Ads SDK

To provide Google Mobile Ads SDK developers for AdMob and Ad Manager more transparency and predictability on the expected lifetime of an SDK version, we are introducing a deprecation schedule for the Google Mobile Ads SDKs for Android and iOS.

Benefits

Introducing a predictable deprecation schedule offers the following benefits for app developers and publishers:

  1. Ability to predict and plan for SDK updates with a year of lead time.
  2. Legacy SDK code that only exists to support old versions can be deleted, thereby decreasing SDK size and lowering the risk of bugs.
  3. Engineering resources are freed up to focus more on support for newer SDKs and innovation of new SDK features.

Glossary

To understand the deprecation schedule, let’s first align the terms used to describe the state of a Google Mobile Ads SDK version:

SDK State Impact
Supported
Deprecated
  • Ads will still serve to this SDK.
  • Support questions specific to this SDK version are no longer answered on the Google Mobile Ads SDK developer forum. Users will be asked to validate the issue in a supported SDK version to receive full support.
Sunset
  • Ads will not serve to this SDK.
  • Ad requests return a no fill with an error indicating that this version is sunset.

Timelines

The deprecation and sunset timelines will revolve around major SDK version releases. We plan to do a major version release annually, in the first quarter of each year. The release of a new major version on both Android and iOS will trigger changes in SDK state for older major versions on both platforms.

Once we release a new major version N for both Android and iOS:

  • All SDK versions with major version N-2 on their respective platforms are considered deprecated immediately. Questions specific to these versions will no longer receive support.
  • All SDKs versions with major version N-3 on their respective platforms will sunset after 2 months.
    • We will publish subsequent blog posts communicating specific sunset dates to activate this two-month sunset period. The first sunset announcement is expected in Q1 2023 with a sunset date in Q2 2023.

With this schedule, a new major version will live in the supported state for about 2 years, and in the deprecated state for an additional year before moving to the sunset state.

The graphic below helps visualize the schedule:

How does the change apply to existing versions?

Effective today, Android v19 and iOS v7 versions are considered deprecated. In accordance with the schedule above, we plan to sunset Android v19 and iOS v7 versions in Q2 2023 following the releases of Android v22 and iOS v9 planned for Q1 2023. We will provide more specific sunset dates following the releases of Android v22 and iOS v9.

The graphic below helps visualize the state of existing Google Mobile Ads SDK versions for Android and iOS with today’s announcement.

Note: Versions 6.x.x and below for both Android and iOS have been sunset since 2018.

Exceptions

The deprecation schedule provides a framework for predictable lifetimes for an SDK version. However, there may be exceptions in the future. This schedule does not preclude us from sunsetting an SDK version at an earlier date, but we are committed to providing proactive communication with ample lead time for any future changes.

Next Steps

  1. Refer to the deprecation developer pages (Android | iOS) for the latest updates to the deprecation schedule. If you are on a deprecated version, see the Android migration guide or iOS migration guide for more information on how to update.
  2. Stay tuned for future updates to this blog, where more specific sunset dates will be communicated once new major Google Mobile Ads SDK versions are released.

If you have any questions about this announcement, please reach out to us on the Google Mobile Ads SDK Developer Forum.

Reviewing ad issues in mobile apps with the Google Mobile Ads SDK

In order to help mobile app publishers review ad issues (e.g., out-of-memory caused by graphic intense creatives, violations of Ad Manager policies, or AdMob policies and restrictions) in production apps, we have recently added an ad response ID to the ResponseInfo and GADResponseInfo objects in the Google Mobile Ads Android SDK (v. 19.0.0) and iOS SDK (v. 7.49.0). An ad response ID is a unique string for each ad response from the AdMob or Ad Manager server, regardless of ad formats. If the same ad is returned more than once, the ad response ID will differ each time.

You can look up an ad response ID in the Ad Review Center (AdMob, Ad Manager) to find and block the offending ad. You can also report problematic ads to Google using the ad response ID, especially when it is difficult to capture a mobile ad's click string.

The screenshot above shows an ad response ID in Android Studio logcat.

If you use Firebase, you can refer to the Firebase Crashlytics Android (AdMob, Ad Manager) or iOS (AdMob, Ad Manager) guide for logging the ad response ID. This technique can be useful for debugging production app crashes as you would have both the SDK symbols and the ad response ID data in the same log.

We hope this new feature makes it easier to troubleshoot ad issues.

If you would like to give us feedback on this feature, please post your comments and questions on our Google Mobile Ads SDK Technical Forum.

Reviewing ad issues in mobile apps with the Google Mobile Ads SDK

In order to help mobile app publishers review ad issues (e.g., out-of-memory caused by graphic intense creatives, violations of Ad Manager policies, or AdMob policies and restrictions) in production apps, we have recently added an ad response ID to the ResponseInfo and GADResponseInfo objects in the Google Mobile Ads Android SDK (v. 19.0.0) and iOS SDK (v. 7.49.0). An ad response ID is a unique string for each ad response from the AdMob or Ad Manager server, regardless of ad formats. If the same ad is returned more than once, the ad response ID will differ each time.

You can look up an ad response ID in the Ad Review Center (AdMob, Ad Manager) to find and block the offending ad. You can also report problematic ads to Google using the ad response ID, especially when it is difficult to capture a mobile ad's click string.

The screenshot above shows an ad response ID in Android Studio logcat.

If you use Firebase, you can refer to the Firebase Crashlytics Android (AdMob, Ad Manager) or iOS (AdMob, Ad Manager) guide for logging the ad response ID. This technique can be useful for debugging production app crashes as you would have both the SDK symbols and the ad response ID data in the same log.

We hope this new feature makes it easier to troubleshoot ad issues.

If you would like to give us feedback on this feature, please post your comments and questions on our Google Mobile Ads SDK Technical Forum.

Reviewing ad issues in mobile apps with the Google Mobile Ads SDK

In order to help mobile app publishers review ad issues (e.g., out-of-memory caused by graphic intense creatives, violations of Ad Manager policies, or AdMob policies and restrictions) in production apps, we have recently added an ad response ID to the ResponseInfo and GADResponseInfo objects in the Google Mobile Ads Android SDK (v. 19.0.0) and iOS SDK (v. 7.49.0). An ad response ID is a unique string for each ad response from the AdMob or Ad Manager server, regardless of ad formats. If the same ad is returned more than once, the ad response ID will differ each time.

You can look up an ad response ID in the Ad Review Center (AdMob, Ad Manager) to find and block the offending ad. You can also report problematic ads to Google using the ad response ID, especially when it is difficult to capture a mobile ad's click string.

The screenshot above shows an ad response ID in Android Studio logcat.

If you use Firebase, you can refer to the Firebase Crashlytics Android (AdMob, Ad Manager) or iOS (AdMob, Ad Manager) guide for logging the ad response ID. This technique can be useful for debugging production app crashes as you would have both the SDK symbols and the ad response ID data in the same log.

We hope this new feature makes it easier to troubleshoot ad issues.

If you would like to give us feedback on this feature, please post your comments and questions on our Google Mobile Ads SDK Technical Forum.

Introducing adaptive anchor banners

In today’s mobile-first world, app publishers who use banner ads must serve them across a greater variety of screen sizes and layouts than ever before. Existing responsive banner ad formats often produce ads that are too small and not optimally tailored to the specifications of each device.

To address this, we’ve created a new banner type called adaptive anchor banners. These banners dynamically adjust creative size to deliver an ad that is ideally sized across all of your user’s devices, without the need to write any custom code.

These banners are designed to replace standard 320x50 and leaderboard banner sizes, as well as smart banners. Here is a comparison of the 3 formats on a standard mobile device:

Standard banner vs. smart banner vs. AdMob’s adaptive anchor banner


Migrating your banner implementation to adaptive

Here are a few simple steps to update your banner implementation to use adaptive banners:

  1. Ensure your UI supports a variable height banner. Depending on what constraints or layout mechanism you are using to position your banner, you may need to remove height constraints such that the layout accepts variable content size.
    • For Android this can be done using WRAP_CONTENT.
    • For iOS constrain your banner in terms of X and Y positions, you may also give it a width constraint, but ensure any height constraint or content size is placeholder only.

    Note that the max height is 15% of the device height or 90px, whichever is smaller.

  2. Use the adaptive banner ad size APIs to get an adaptive ad size. The adaptive ad size APIs are available for different orientations.

    Android:
    AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(context, width)
    AdSize.getPortraitAnchoredAdaptiveBannerAdSize(context, width)
    AdSize.getLandscapeAnchoredAdaptiveBannerAdSize(context, width)

    iOS:
    GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(width)
    GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth(width)
    GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(width)

    Unity:
    AdSize.GetCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(width)
    AdSize.GetPortraitAnchoredAdaptiveBannerAdSizeWithWidth(width)
    AdSize.GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(width)

    Which one you use depends on your use case. If you want to preload ads for a given orientation, use the API for that orientation. If you only need a banner for the current orientation of the device, use the current orientation API.

    Once you have an ad size, set that on your banner view as usual before loading an ad. The banner will resize to the adaptive ad size as long as you have laid it out without any conflicting constraints.

  3. Update your mediation adapters. If you use mediation, update your mediation adapters to the latest version. All open source mediation adapters that support banners have been updated to support the adaptive banner ad size requests. Note that adapters will still only return ad sizes supported by their corresponding ad network SDK, and those ads will be centered in your adaptive banner view.

Review our developer resources

For further information including detailed implementation guidance, review our developer resources:

As always, please reach out on our developer forum if you have any questions.

Share your feedback about AdMob and Ad Manager mobile app integration

We’re continuously improving our guides, code samples, and other developer resources for the Google Mobile Ads SDK to help you integrate AdMob and Ad Manager into your mobile apps.

To learn more about what's working well and what could be improved, we're announcing our second annual developer feedback survey for the Google Mobile Ads SDK. We'd like to hear from you about where we should focus our efforts.

SHARE YOUR FEEDBACK

Your answers will be completely anonymous. The survey should take about 15 minutes to complete and will close on September 30, 2019.

Your feedback is truly important to us. Here are a few highlights of the changes we made based on feedback from last year’s survey:

  1. Continuous translations of the developer docs in several languages
  2. Continuous build integration of sample applications via Travis CI
  3. Launched a Developer tutorials playlist on the Google AdMob YouTube channel
  4. Launched the App Policy Center to help publishers handle policy violations

Please let us know what you’d like us to focus on next. Thank you in advance for helping us continue to improve the developer experience for everyone.

Google Mobile Ads SDK for Android: How to migrate to v18.0.0

Earlier this week, Google Play services released a major update to many of its libraries to migrate all Android support library dependencies to Jetpack (using androidx.* packages). This includes the play-services-ads library from the Google Mobile Ads SDK, which has been updated to 18.0.0.

While the Google Mobile Ads SDK itself hasn’t changed between version 17.2.1 and 18.0.0, you’ll need to migrate your own app and all of your dependencies to AndroidX in order to pick up play-services-ads 18.0.0 or any future versions. This is particularly important if you use AdMob mediation, as several mediation partners have dependencies on Android support libraries that aren’t compatible with AndroidX.

To make the migration process as smooth as possible for you, Android Studio offers an easy way to convert your project and its dependencies to AndroidX using the Migrate to AndroidX option.

Migrate to AndroidX

Android Studio 3.2 or higher includes a Refactor > Migrate to AndroidX menu option to convert your project to use AndroidX. We’ll demonstrate what happens when converting our BannerExample to AndroidX.

  1. Change the project’s compileSdkVersion to 28. This is a prerequisite for migrating to AndroidX.
  2. Right click the app module, and select Refactor > Migrate to AndroidX. You’ll be given an option to save your project as a zip file before Android Studio converts it.
  3. Select Do Refactor to complete the migration.

What changed?

Here is the project before the migration:

And here is the project afterwards:

First, you’ll notice that the package name for AppCompatActivity has changed to androidx.appcompat.app. The refactor has changed this project’s com.android.support:appcompat-v7:26.1.0 dependency to androidx.appcompat:appcompat:1.0.0 and fixed the associated imports.

Second, this migration added a gradle.properties file with these two lines:

android.useAndroidX=true
android.enableJetifier=true

These properties ensure your project and its dependencies use AndroidX, by rewriting any binaries that are using an Android support library. See Using AndroidX for more details on these flags.

Now that your project is converted to AndroidX, you can safely update your play-services-ads dependency to 18.0.0 in your project-level build.gradle file:

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.gms:play-services-ads:18.0.0'
}

As always, you can follow the release notes to learn what’s changed in the Google Mobile Ads SDK. We’d also love to hear about how your migration went! If you have any questions about the release or have trouble migrating, please reach out to us on the Google Mobile Ads SDK developer forum.

Announcing v17.0.0 of the Android Google Mobile Ads SDK

Google Mobile Ads SDK v17.0.0 for Android has just been released, and it comes with two important changes that you should be aware of:

  1. A tag is now required in AndroidManifest.xml.
  2. NativeAppInstallAd and NativeContentAd APIs are deprecated in favor of UnifiedNativeAd.

Required AndroidManifest.xml changes

Starting in version 17.0.0, if you are an AdMob publisher you are now required to add your AdMob app ID in your AndroidManifest.xml file. Once you find your AdMob app ID in the AdMob UI, add it to your manifest adding the following tag:

<manifest>
<application>
<!-- TODO: Replace with your real AdMob app ID -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-################/##########"/>
</application>
</manifest>

Failure to add this tag will result in the app crashing at app launch with a message starting with "The Google Mobile Ads SDK was initialized incorrectly."

What if I'm using Google Ad Manager instead of AdMob?

Publishers using Google Ad Manager will need to declare themselves as an Ad Manager app with a different tag to avoid the same crash:

<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
</application>
</manifest>

See the getting started guide (AdMob | Ad Manager) for additional details on how to make this change.

NativeAppInstallAd and NativeContentAd APIs are deprecated

This release also officially deprecates the NativeAppInstallAd and NativeContentAd APIs in favor of the previously released UnifiedNativeAd API. The UnifiedNativeAd APIs offer a consolidated way to render any type of native ad, reducing the number of lines of code needed to integrate native ads by up to 50%.

The following example shows how to load both app install and content ads using the new unified API:

AdLoader adLoader = new AdLoader.Builder(context, "ca-app-pub-3940256099942544/2247696110")
.forUnifiedNativeAd(new UnifiedNativeAd.OnUnifiedNativeAdLoadedListener() {
@Override
public void onUnifiedNativeAdLoaded(UnifiedNativeAd unifiedNativeAd) {
// Show the ad.
}
})
.build();
adLoader.loadAd(new AdRequest.Builder().build());

Check out the native ads guide to get started with the unified API.

What else changed?

See the release notes for a full list of changes. If you have any questions about the release, please reach out to us on the Google Mobile Ads SDK developer forum.