Category Archives: Ads Developer Blog

The official blog for information about the AdWords, AdSense, DoubleClick and AdMob APIs and SDKs

May 2019 Ad Manager API Workshop Slides

Thanks to everyone who was able to make it to the recent Ad Manager API Workshop in New York! If you are interested in the content we covered, you can now access the presentation materials from the workshop talks.

We are already planning future workshops, so be sure to check this blog for more updates. If you have general API questions or comments, please reach out to us on the Ad Manager API forums.

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.

Upcoming changes to App campaigns

We will be rolling out the improved version of App campaigns in the AdWords API and Google Ads API over the coming months. Please make sure you get your code ready before the migration of all campaigns to the new structure on August 6, 2019.

What's changing
Once this change is rolled out to a given account, all App campaigns for that account will immediately begin using the new fields. You will no longer use a UniversalAppCampaignSetting, which included both information about the app and references to media and descriptions that would be used for ads in that campaign.

Instead, you will specify an AppCampaignSetting in the Google Ads API (UniversalAppCampaignInfo in the AdWords API), which contains only basic details about the app you want to promote through advertising. All the specific ad-level details will be added in the new AppAdInfo in the Google Ads API (UniversalAppAd in the AdWords API). This improved structure allows you to have a single campaign for each app you want to advertise, and offers the flexibility to have a variety of different ads within that campaign.

For reporting, stats at the ad group level will be available in the Google Ads API only.

Update schedule
For this update, we are rolling out the changes in two phases.
  • On June 17, 2019, all test accounts will be updated to use the new App campaign settings. Starting on this date, you can write test code against a test account you own to ensure that your code is ready for the full migration.
  • On August 6, 2019, all Google Ads accounts will be updated to use the new App campaign settings. Make sure that you have tested and deployed your new code to adapt to the changes by this date.
If you have any questions or concerns, please don't hesitate to contact us via our forum.

Sunsetting the creation of target spend field for Maximize Clicks strategies in Google Ads API

On July 31st, 2019 we will begin to sunset the target spend field for Maximize Clicks bidding strategies in the API. This will affect all versions of both the AdWords API and Google Ads API. The following behaviors will be blocked:
  • Populating the target spend field on existing standard and portfolio strategies.
  • Attaching portfolio strategies that have the deprecated field set to campaigns.
Later this year, our systems will start ignoring the target spend field and instead use your daily budget to manage spend. In order to prepare for this change, you should start using your budgets to specify how much you’d like to spend for Maximize Clicks bidding strategies and migrate your campaigns off this field today.

Read on to see how this will affect your API usage.
Affected Target Spend Fields
Google Ads API campaign.target_spend.target_spend_micros
bidding_strategy.target_spend.target_spend_micros
AdWords API Campaign.BiddingStrategyConfiguration.TargetSpendBiddingScheme.spendTarget
SharedBiddingStrategy.TargetSpendBiddingScheme.spendTarget


Change Description
Any mutate operations that set a target spend field for the first time will return an error. You will be able to update a target spend field that currently contain a value, but you cannot set previously empty fields to a new value. Additionally, any operation attaching a bidding strategy to a campaign, where that bidding strategy has a value set for a target spend field, will throw an error. To manage Target Spend on any new campaigns, we recommend using a campaign budget. In each of these disallowed cases an error will be thrown.

Performing any of the disallowed actions above will generate one of the following errors:
  • OPERATION_NOT_PERMITTED_FOR_CONTEXT
  • UNSUPPORTED_FIELD_IS_SET
If you have any questions about this change or any other API feature, please contact us via the forum.

Content API for Shopping live webinar on May 31st (Mandarin, Chinese)

We are running a live webinar this Friday, May 31, on the Content API for Shopping. This webinar is for our Chinese-speaking developers that are interested in using the API to manage products and Shopping ads at scale.

The webinar will cover topics on:
  • Content API for Shopping use case
  • Merchant Center setup
  • Content API features
  • Best practices
  • API request/response demo
You will be able to submit questions throughout the live event. We will answer questions during the Q&A session in the webinar.

Note: The webinar content will be delivered in Mandarin, Chinese.

The webinar will begin at 10:00am (China Time, GMT +8) on Friday, May 31, 2019. Please contact us via the Content API forum if you have any questions or need help.

If you’d like to review some of our previous webinars covering the Google Ads API, you can find them at the following links:

Migrating from position to impression share bidding strategies in Google Ads

In June 2019, we will shut off the ability to add new Target Search Page Location and Target Outranking Share bidding strategies. This will affect both the AdWords API and the Google Ads API. Later this year, existing campaigns on these strategies will automatically be migrated to the new Target Impression Share bidding strategy, which offers more flexible and granular controls to optimize for your desired impression share and search page location.

Read on to see how this will affect your API usage.

Google Ads API Users
Please start using the TARGET_IMPRESSION_SHARE BiddingStrategyType rather than TARGET_OUTRANK_SHARE or PAGE_ONE_PROMOTED.

If you attempt to create a TARGET_OUTRANK_SHARE or PAGE_ONE_PROMOTED after they are removed, you will get an error.

AdWords API Users
If you attempt to use the AdWords API to add a TARGET_OUTRANK_SHARE or PAGE_ONE_PROMOTED bidding strategy after they are removed, you will get an error.

All existing campaigns using the old bidding strategies will be automatically migrated to use Target Impression Share for both APIs. The AdWords API does not support the Target Impression Share bidding strategy, so we recommend migrating to the Google Ads API if you need this functionality.

If you have any questions about this change or any other API feature, please contact us via the forum.

Join us for a live webinar on Google Ads API and Hotel Ads

Please join us later this week for a livestream webinar covering the latest Hotel Ads features in the Google Ads API. In particular, we’ll cover using hotel listing groups and leveraging Hotel Ads-specific reporting features. We’ll also be answering some of your questions during the event.

The webinar will begin at 11:00am EDT on Thursday, May 30, 2019.
As always, please contact us via the Google Ads API forum if you have any questions or need help.

If you’d like to review some of our previous webinars on related topics, you can find them at the following links:

Announcing v1_3 of the Google Ads API

Today we’re announcing the v1_3 release of the Google Ads API. With this version, you’ll continue pointing to v1 as your endpoint; however, you'll need to update your client libraries in order to use v1_3 features.

Here are the highlights: What resources are available?
The following resources should help you get going with v1_3 of the Google Ads API: The updated client libraries and code examples will be published by May 24, 2019. If you have any questions or need help, please contact us via the forum.

Announcing v201905 of the Google Ad Manager API

We're happy to announce that v201905 of the Google Ad Manager API is available starting today. This version introduces a long-requested feature: Targeting Presets. The new TargetingPresetService allows you to read your network's targeting presets in a familiar Targeting object that can be applied to line items, forecasts, and proposal line items.

This release also introduces support for configuring and reporting on custom dimensions, and new Programmatic features such as Pause and Resume actions for Proposals.

For a full list of API changes in v201905, see the release notes.

For questions about these or any other API changes, reach out to us on the Ad Manager API forums.

Expanding your Shopping ads to additional Google platforms

YouTube and Google Discover power visually rich experiences and play a part of millions of users’ shopping journeys. Soon your Standard Shopping campaigns will be able to reach users who discover and continue their shopping journey on these additional Google platforms.

We’re excited to announce that Shopping ads (both Product Shopping ads and Showcase Shopping ads) in your standard Shopping campaigns will be eligible to appear on YouTube and Google Discover beginning the week of July 15th, 2019. Shopping ads served on YouTube and Google Discover will be reported under the Google Display Network.

In preparation for this change, standard Shopping campaigns that are enabled for Search Network will be automatically enabled for YouTube and Discover, beginning the week of June 17th, 2019. This means that any standard Shopping campaigns that target the Search Network will automatically enabled to target the Content Network. After this process, developers using the Google Ads API or the AdWords API can give users the ability to opt-in/opt-out. They can do this by changing the campaign target network as follows:
  • Google Ads API - Modify the NetworkSettings of the standard Shopping campaign to set target_content_network to true or false.
  • AdWords API - Modify the NetworkSetting of the standard Shopping campaign to set targetContentNetwork to true or false.
Ads with these settings will only be eligible to appear on YouTube and Google Discover from the week of July 15th, 2019. During that week, you may start seeing new metrics as part of your reporting data. Depending on which API you are using you can access the metrics by doing the following: Note: If you would like to upgrade to the Google Ads API from the AdWords API, please see more information our blog.

If you have any questions or need help, please contact us via the forum.