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
- Make a request to
products.list
. - Filter your products to search for products where the
targetCountry
field does not exist on the product. - If any products appear, you have offers without a country in your Merchant Center.
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.