Author Archives: Google Ads Developer Advisor

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.

    AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(context, width)
    AdSize.getPortraitAnchoredAdaptiveBannerAdSize(context, width)
    AdSize.getLandscapeAnchoredAdaptiveBannerAdSize(context, 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.

Announcing v201911 of the Google Ad Manager API

We're happy to announce that v201911 of the Google Ad Manager API is available starting today. This version brings new reporting and video features, unlocking new possibilities for automation in your Ad Manager network.

  • We’re improving our reporting error messages so that you can better understand what went wrong in a number of situations, including when a report has an invalid date range.
  • You can now break down reports by CMS Metadata, which was added as a targeting option in v201902 of the Ad Manager API.
  • On video line items, you can now read and write customVastExtension, which provides access to XML extensions that are part of the VAST specification (both v3 and v4).
  • For further configurability of Dynamic Ad Insertion, you can now set the mediaPlaylistOriginForwardingType and mediaPlaylistOriginPathPrefix fields on CdnConfigurations.

If you’re on an older version of the Ad Manager API, now is a great time to upgrade to take advantage of these and other recent features like the TargetingPresetService, which was added in v201905. The release notes contain the full list of API changes for v201911 and all other active API versions.

Feel free to reach out to us on the Ad Manager API forum with any API-related questions.

Sunset of the Ad Manager API v201811

On Monday, December 2, 2019, in accordance with the deprecation schedule, v201811 of the Ad Manager API will be sunset. At that time, any requests made to this version will return errors.

If you’re still using this version, now is the time to upgrade to the latest release and take advantage of new features like the TargetingPresetService and reporting on CustomTargetingKeys.

When you’re ready to upgrade, check the release notes to identify any breaking changes. Then, grab the latest version of your client library and update your code.

We now provide a machine-readable version of our deprecation schedule, giving you more flexibility to stay up to date with the latest Ad Manager API features. You can access this CSV file at

As always, don't hesitate to reach out to us on the developer forum with any questions.

Video and Channel IDs Change in AdWords API, Google Ads API, and Google Ads Scripts Starting November 15, 2019

On November 15, 2019, AdWords API, Google Ads API, and Google Ads scripts will start returning null ID criteria for YouTube channels and videos that have been deleted, due to changes in our data retention policy. The criteria itself remains for a given ad group, but referencing the video ID or channel ID for that criteria will return null.
  • In the AdWords API v201809, null values are returned as two dashes (--) in reporting.
  • In the Google Ads API, NULL values are returned as NULL values.
  • In Google Ads Scripts, null values are returned as null JavaScript values.
Please update your code where it uses these fields:
AdWords API Google Ads API Google Ads Scripts
YouTubeVideo.videoId YouTubeVideoInfo.video_id YouTubeVideo.getVideoId()
YouTubeChannel.channelId YouTubeChannelInfo.channel_id VideoYouTubeVideo.getVideoId()
Criteria in CAMPAIGN_CRITERIA_REPORT Media.getYouTubeVideoId()

If you have any questions while updating your code, please reach out to us on our forum.

Python 2 Deprecation in Google Ads API Client Library

On June 11, 2019 we deprecated support for Python 2 in the AdWords/Google Ad Manager client library for Python. As part of our previously announced plans, in mid-November 2019 we will be deprecating support in the Google Ads client library for Python as well.

When version 4.0.0 of the Google Ads client library for Python is released, we will officially end support for Python 2 and versions of Python 3 prior to 3.6.0.

If you use the Google Ads client library for Python, please take note of the following:
  • If you are already using Python version 3.6.0 or later, you can upgrade to Google Ads client library 4.0.0 and no other action is needed. If not, please do not upgrade to version 4.0.0 until you’ve upgraded to Python version 3.6.0 or later.
  • Version 4.0.0 will continue to support previous API versions such as v1_3 but we won't support client library issues related to Python 2 compatibility. For example, we won't release version 4.0.1 to fix a bug that only exists for Python 2 users.

If you have questions about the Python 3 migration, please submit an issue on the Google Ads client library repository’s Issues page, and for general API support please reach out to us on the Google Ads API forum.

Upcoming sunset of accelerated budget delivery

This is a reminder that, starting October 14, 2019, accelerated budget delivery will no longer be generally available in AdWords API, Google Ads API, and Google Ads scripts for use with shared budgets, search campaigns, and shopping campaigns.

We encourage all developers to review our announcement of the sunset, which has been recently updated to include the most up-to-date information on expected error codes that could be returned after this change goes into effect.

Please don’t hesitate to contact us via the AdWords API and Google Ads API Forum or the Google Ads scripts forum if you have any questions.

Adam Ohren, Google Ads API Team

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.


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.

Structured Data Files v5 now available in the DoubleClick Bid Manager API

Today we're announcing the general availability of Structured Data Files (SDF) v5 in the DoubleClick Bid Manager API. Highlights of this release include:
  • Updates to environment targeting
  • TrueView for action
  • Regional location list targeting
  • Deal simplification updates
  • IO-level budget optimization
As previously announced, this release introduces a number of breaking changes to SDF v3.1, v4, v4.1, and v4.2. All existing SDF users who rely on legacy targeting fields must now migrate in order to make use of the new, enhanced targeting fields in SDF v5.

Retiring older API versions

We're also introducing a new deprecation schedule and announcing the deprecation of all SDF versions prior to v5. Moving forward, we will generally only support 3 versions of SDF at a time and sunset the oldest version 4 months after a new release. In order to help developers adjust to this new schedule, we're providing an extended migration period for these newly deprecated versions and announcing a sunset date of February 28, 2020 for SDF v3.1, v4, v4.1, and v4.2.

These versions will remain active and supported until the sunset date, and we encourage you to use this time to update your applications. After the sunset date, requests to these versions will no longer work, preventing you from accessing SDF.

Get started with SDF v5

All SDF users are encouraged to begin requesting v5 files in order to take advantage of the new features listed above. To do so, simply pass 5 as the value of version when calling For workflows that are dependent on older SDF formats, you can find additional details about the file format changes in the release notes.

Questions about this or anything else DV360 related? Contact our support team.

Announcing the 2019 London Google Ad Manager Developer Workshop

The Ad Manager Developer Relations team is excited to hop across the pond and bring our Ad Manager Developer Workshop to London on September 26, 2019. If you’re a regular user of the Ad Manager API and Google Publisher Tags, then you’re sure to find something of interest at this event!

What is it?

A full-day event featuring technical talks by Google engineers and office hours with Google's Developer Relations team. We will have talks on a range of topics, including Ad Manager API tips and best practices and strategies for faster loading pages and ads.

Who is the target audience?

The event is targeted toward developers who use the Ad Manager API. The talks will be technical in nature, so a technical background is required for all attendees. You’ll get the most out of some sessions if you come prepared with an API user’s credentials for your network and a laptop. For the full list of sessions, see the event schedule.

Where and when?

This event will be at Google’s London office at 1 St Giles High St. Doors will open at 9:30 AM and we’ll kick things off at 10 o’clock.

How do I sign up?

To register, please visit our website for this event. Seating is limited, so after you register, we will reach back out to you to confirm your spot at the workshop.

Restricting Payments account usage across manager account hierarchies

Starting September 9, 2019, we are rolling out a change to prevent the same Payments accounts in the Google Ads API (billing accounts in the AdWords API) from being used across manager account hierarchies. Only valid Payments accounts belonging to the Google Ads manager account hierarchy can be used to create and update billing setups in the Google Ads API.

How does this affect you?
For your authenticated Google Ads client account Therefore, you may get fewer results from those API calls than before.

What do you need to do?
Google Ads API
When creating/updating a new billing setup, you will need to select a valid Payments account returned by PaymentsAccountService.ListPaymentsAccounts(). If you use an invalid Payments account during the above processes, the INVALID_PAYMENTS_ACCOUNT error will be thrown.

AdWords API
When creating a new budget order, you will need to specify a valid billingAccountId (the ID of a valid billing account returned by BudgetOrderService.getBillingAccounts()). If you use an invalid billingAccountId during the above process, the BudgetOrderError.INVALID_BILLING_ACCOUNT error will be thrown.

As always, if you have any questions, feel free to post your questions on the Google Ads API forum.