Category Archives: Ads Developer Blog

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

Announcing v202208 of the Google Ad Manager API

We're pleased to announce that v202208 of the Google Ad Manager API is available starting today, August 16th. This release adds support for AMP URLs in ThirdPartyCreatives, InventorySizeTargeting in traffic forecasts, and Real-time video reporting.

For the full list of changes, check the release notes. Feel free to reach out to us on the Ad Manager API forum with any API-related questions.

Country targeting in Shopping Ads campaigns is changing in August 2022

We’re starting a phased rollout of a change to country targeting in Google Ads and Merchant Center. The rollout has already begun and will continue into September.

See Feed label replaces target country in Content API for Shopping for how this change impacts the Content API for Shopping.

When the change reaches you, you’ll be able to set the feed_label field in ShoppingSetting for Shopping & Performance Max campaigns in the UI and API. Due to this change, you may begin seeing campaigns with feed_labels set in the UI and API for certain merchants. Campaigns with feed_label not set to a 2-letter CLDR territory code can serve ads in any country as long as the campaign has the appropriate geoTargeting and the appropriate target countries are set in Merchant Center.

This change doesn’t impact the countries targeted by existing shopping feeds. You don’t need to update existing shopping feeds or campaigns.

What’s changing in Merchant Center
Today, Google Merchant Center feeds require you to select a primary country of sale target (sales_country in Google Ads API), with the option to provide additional target countries once the feed has been created. Starting in August 23, 2022, we will make the following changes to how target countries are organized in the Merchant Center UI:
  • The primary country of sale option will be removed in Google Merchant Center. Country of sale will be replaced by the more generic feed_label that can accept any string, including any existing 2 letter CDLR country code.
  • The current additional countries field will be renamed target countries, and will include all countries you want the feed to target.
What’s changing in Google Ads UI and API
The current sales_country field for all available Shopping campaign types, including Performance Max, will eventually be replaced by feed_label. Note that we will keep the sales_country field for backwards compatibility until at least Q2 2023. Right now, you can continue to use sales_country in your campaigns.

You can create a feed_label in Google Merchant Center or the Content API. Feed labels let you group different offers according to a common trait, like language (or a country, as you’ve currently been doing). You can also use feed_labels in Google Ads campaigns to target the relevant offers (all products with the same Merchant Center feed label).

The ads for the offers that match the feed_label will show based on the following:
  1. The countries you selected as target countries in Merchant Center.
  2. Your campaign’s geo targeting. Note: The default campaign targeting behavior (if you do not geo target) is that your products will serve in all your Merchant Center target countries.
How you’re impacted
The phased rollout to enable this feature in Google Ads UI and API has already started, and is expected to be complete by the end of September 2022. For existing feeds, feed_label will automatically be set to the two-letter territory code of the existing sales_country field to avoid interrupting existing targeting.

However, if you want to support new users or new feeds that only have a feed_label and not a sales_country field, we recommend you update your code by August 23, 2022 to accommodate customers who will use campaigns that only have a feed_label (without a sales_country).

If you have any questions or concerns, please don't hesitate to contact us via the forum.

Feed label replaces target country in Content API for Shopping

On August 23, 2022 we will gradually start updating the way country targeting works for shopping products. As a result, the targetCountry field for newly inserted products and the country field for new datafeeds may be empty in the Content API for Shopping. While targetCountry and country are now deprecated, there are no plans to remove these fields from v2.1 to preserve backward compatibility. We recommend using feedLabel to name new products and feeds, and using the shipping field to specify the countries to target.

If you're accessing accounts whose product data you don’t have total control over and you are unsure whether the products or datafeeds will have ONLY a feedLabel field beginning in late August, we recommend you update your code to support the feedLabel field.

This upcoming change might impact or break your API integration if your application cannot handle products without a targetCountry or datafeeds without a country.

See Country targeting in Shopping Ads campaigns is changing in August 2022 for how this change will impact Google Ads.

What’s already changed
On August 8, 2022, the Content API for Shopping added the feedLabel field to the products resource. As of August 8, 2022, feedLabel can only accept and return two-letter CLDR territory codes. Products now require either targetCountry or feedLabel. As long as the feedLabel set is a valid two-letter CLDR code, targetCountry will be backfilled for compatibility.

We have changed the definition of the product identifier (the id, i.e. the REST ID). feedLabel now replaces targetCountry as the third component of the identifier, so it is no longer just a valid two-letter CLDR code. You can find an example shown here.

This change to product identifier is backwards compatible, so existing REST IDs for existing products will continue to work without change.

Important: feedLabel doesn’t impact targeting. This means if you use feedLabel instead of targetCountry, you need to specify all countries you want to target in the shipping attribute.

What’s coming next
We’re starting a gradual rollout to all users on August 23, 2022. When the upcoming change reaches you, you’ll be able to create a product or datafeed with any string (not just a two-letter CLDR code) as the feedLabel via the API or the Merchant Center. You’ll still be able to use a two-letter country code in targetCountry for backwards compatibility.

After the upcoming change, if you submit a feedLabel that isn’t a CLDR territory code, the API will return those products without a targetCountry or those datafeeds without a country. Instead, only their feedLabel will be populated. This may break your codebase if your implementation expects a value in targetCountry for products or a value in country for datafeeds.

How you’re impacted
Products
If you continue inserting your products with a targetCountry, you are not required to make any changes at this time, as the feedLabel value in the products REST ID will be identical to the targetCountry you inserted.

However, if you use a feedLabel in Merchant Center or the API that is not a CLDR territory code, we highly recommend you update your codebase to use feedLabels on all product insertions instead of targetCountry to avoid issues with your API integration.

All products inserted with a feedLabel instead of targetCountry, even if the feedLabel is a CLDR territory code, will not automatically target that country. You must explicitly set the countries you want to target via the shipping field.

Datafeeds
Note that starting August 23, 2022, feed label will replace the current country of sale value in the Merchant Center UI. The Content API will be expected to support this change via the datafeeds service starting mid-September. These new datafeeds will only have the feedLabel field set, not the country field, unless you explicitly set the feedLabel to a CLDR territory code.

To support new users, we highly recommend you update your codebase to use feedLabels on all datafeeds instead of country to avoid issues with your API integration.

Recommendation for third party integrations
If you’re a third party or agency that manages your customers' accounts for them, we highly recommend you check your codebase is able handle products without a targetCountry and datafeeds without a country before August 23, 2022.

After the gradual rollout starting in late August, your merchants will be able to modify products directly in Merchant Center to create a product with a feedLabel that is not a valid two-letter CLDR territory code. When this product is returned via products.list, you could encounter issues if your implementation expects a value in targetCountry.

As well, after the gradual rollout in late August, new users will create datafeeds that by default have a feedLabel and no country field. When this datafeed is returned via datafeeds.list, you could encounter issues if your implementation expects a value in country.

How to detect if you have offers without a country in your Merchant Center account
  1. Make a request to products.list.
  2. Filter your products to search for products where the targetCountry field does not exist on the product.
  3. If any products appear, you have offers without a country in your Merchant Center.
Detailed Changes
To view a detailed breakdown of the changes to the Content API by this feature launch, see the guide here.

Datafeeds Service
Starting mid-September the datafeeds service will begin to return feedLabel on all datafeeds, which will be the country value if that is how the datafeed was created. The datafeeds service will also return the country field if the feedLabel is a valid country code for backwards compatibility.

Opt out of receiving products and datafeeds without a country
If you’re concerned your codebase cannot handle products and datafeeds without a country, and you want to opt out of receiving them via the Content API after August 23, then please fill out the following form: Feed label replaces target country in the Content API for Shopping - temporary exemption. Once you have fully supported feedLabel, you will be able to opt back in to receiving these offers.

If you have any questions or concerns, please don't hesitate to contact us via the forum.

Google Ads Scripts migration office hours

The new experience for Google Ads scripts has been available for a while, so hopefully you've had a chance to try it out and enjoy all the benefits it has to offer. There are a few differences from the old scripts API, which we've documented in our migration guide.

If you've given those a go, reached out on our forum or to our support alias for assistance, and are still having any difficulties understanding the changes or having problems migrating a particular script, we are launching a limited series of office hours sessions on a first come, first serve basis.

If you're interested, check out more information on our office hours information page.

As a reminder, we will begin migrating scripts automatically to the new experience starting in September of this year, and will be migrating all scripts to use the new scripts experience in October.

If you have any questions or feedback regarding the new experience, please leave a post on our forum or send a message to our support alias [email protected] so that we can help.

Performance Max upgrade has started

As we announced in January and again in March, existing and future Smart Shopping campaigns (SSC) will automatically upgrade to Performance Max campaigns between July and September 2022. The self-upgrade started in April 2022. The automatic upgrade has commenced (related blog post) and should complete by September 30, 2022. This blog post adds details for our API developers.

Starting July 25, 2022, accounts without active or paused SSCs (including new accounts) will no longer be able to create SSCs.

Once an account with active or paused SSCs has been automatically upgraded from SSC to Performance Max, no new SSC creation will be permitted in any surface including the UI, the API, Google Ads Scripts or Google Ads Editor.

The Google Ads API v11 included a new UpgradeSmartShoppingCampaignToPerformanceMaxRecommendation recommendation type to allow developers to upgrade a given SSC to a Performance Max campaign. This can still be applied to an account that has not yet automatically upgraded.

As mentioned in the January blog post, Local campaigns will also be automatically upgraded to Performance Max. An upcoming release of the Google Ads API will include a new recommendation type to allow developers to upgrade an eligible Local campaign to a Performance Max campaign.

Additional information

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

Display & Video 360 API Annual Developer Survey 2022

As we continue to regularly update the Display & Video 360 API, we’re always looking for how we can improve the developer experience. With this in mind, we are asking for your feedback on our first Display & Video 360 API annual developer survey.

Please take 15-20 minutes to share your feedback about the Display & Video 360 API on our Annual Display & Video 360 API Developer Survey for 2022.

Through this survey, we are especially interested in understanding how you are using the API, what features you’d like added, and what we can do to make onboarding to the API easier. Your feedback will help shape the product roadmap for the next year.

Use the new Google Mobile Ads SDK getVersion() method

We heard your feedback that MobileAds.getVersionString() was confusing as it didn’t match the external version. We addressed it by adding a new method - MobileAds.getVersion(). In doing so, we have deprecated MobileAds.getVersionString().

Distinctions between getVersionString() and getVersion()

getVersionString() [deprecated] getVersion()
Sample return value afma-sdk-a-v214106000.214106000.0 21.0.0
Requires calling initialize() first? Yes No

Calling MobileAds.getVersionString() returns an internal version number. The MobileAds.getVersion() method outputs a simplified, external version number that matches the version in the release notes. For example, 21.0.0.

Also as part of the v21.0.0 release, you can call MobileAds.getVersion() before calling MobileAds.initialize(). Previously, you had to initialize the SDK to query the SDK version number, or else the app would crash.

Querying the SDK version number can be accomplished in your Android apps with the following code snippet:

// Log the Mobile Ads SDK Version.
Log.d("MyApp", MobileAds.getVersion()); // "21.0.0"

// Initialize the SDK.
MobileAds.initialize(this, new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus status) {}
});

For the full list of changes in the v21.0.0 release, check the release notes. If you have any questions or need additional help, contact us via the forum.

Upcoming changes to conversion action management

Starting August 22, 2022, the include_in_conversions_metric field of the ConversionAction resource will become read-only. Requests that attempt to set this value will result in a FieldError.IMMUTABLE_FIELD error.

Why is this change happening?
As part of the addition of conversion goals in Google Ads, the new primary_for_goal field replaced the include_in_conversions_metric field. To ease the transition to the new field while we enabled goals on all accounts, the Google Ads API allowed you to continue to set the deprecated include_in_conversions_metric field, and the API would automatically update primary_for_goal accordingly. However, now that conversion goals are enabled in all Google Ads accounts, we're preventing setting include_in_conversions_metric to avoid conflicts with primary_for_goal.

What should you do?
Modify any code that sets include_in_conversions_metrics to instead set primary_for_goal. In addition, review and modify any of your application logic that uses the conversion_action.include_in_conversions_metric field in reports. Check out the conversion goals guide for more information on how the primary_for_goal setting impacts bidding and reporting.

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

Upcoming changes to conversion action management

Starting August 22, 2022, the include_in_conversions_metric field of the ConversionAction resource will become read-only. Requests that attempt to set this value will result in a FieldError.IMMUTABLE_FIELD error.

Why is this change happening?
As part of the addition of conversion goals in Google Ads, the new primary_for_goal field replaced the include_in_conversions_metric field. To ease the transition to the new field while we enabled goals on all accounts, the Google Ads API allowed you to continue to set the deprecated include_in_conversions_metric field, and the API would automatically update primary_for_goal accordingly. However, now that conversion goals are enabled in all Google Ads accounts, we're preventing setting include_in_conversions_metric to avoid conflicts with primary_for_goal.

What should you do?
Modify any code that sets include_in_conversions_metrics to instead set primary_for_goal. In addition, review and modify any of your application logic that uses the conversion_action.include_in_conversions_metric field in reports. Check out the conversion goals guide for more information on how the primary_for_goal setting impacts bidding and reporting.

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