Category Archives: Ads Developer Blog

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

Experiment changes in Google Ads scripts

Starting in April, we will be rolling out a change to the way you create experiments in Google Ads scripts to bring the process more in line with the Google Ads API. Previously, you would create a draft, modify the draft, and then create an experiment from the modified draft. Now, you will create the experiment directly, which will automatically create the underlying drafts and allow you to modify them before scheduling the experiment.

You can read more about this feature in our Drafts and Experiments guide.

To summarize the new changes in a simple example, if you had code such as:

const draft = campaign.newDraftBuilder()
.withName(newDraftName)
.build()
.getResult();
// Modify the draft campaign before beginning the experiment.
const draftCampaign = draft.getDraftCampaign();
const experiment = draft.newExperimentBuilder()
.withName(newExperimentName)
.withTrafficSplitPercent(50)
.startBuilding();
The new equivalent code would be:

const experiment = AdsApp.newExperimentBuilder()
.withCampaign(campaign)
.withTrafficSplitPercent(50)
// Some new fields are required.
.withStartDate("20230501")
.withEndDate("20230601")
.withType("SEARCH_CUSTOM")
// The suffix will automatically be added to the end of the name for
// each experiment campaign.
.withSuffix("experiment")
// Goals have no effect on the serving of the experiment, but instead
// just help you keep track of your intentions.
.withGoals([{metric: 'CLICKS', direction: 'INCREASE'}])
.build();
// The experiment campaign is the new equivalent of the draft campaign
// in the example above.
const experimentCampaign = experiment.getExperimentCampaign();
This change will allow us to bring further improvements to this feature as they are added in the Google Ads API.

If you have any questions or feedback, please leave a post on our forum or send a message to our support alias [email protected].

Deprecation of Display & Video 360 API v1

Today we are deprecating Display & Video 360 API v1. While deprecated, v1 will no longer be updated. We will sunset v1 on September 14, 2023. Migrate to v2 before the sunset date to avoid an interruption of service.

You can read our release notes for more information about new features available in v2, such as the ability to retrieve YouTube & Partners line items, ad groups, and ads. Follow the steps in our v2 migration guide to help you migrate from v1 to v2.

After supporting and regularly updating Display & Video 360 API v1 for over three years, we are excited to introduce new Display & Video 360 API features using a more consistent version release and sunset schedule. A projected schedule will be announced on this blog at a later date.

If you run into issues or need help with your migration, please contact us using our support contact form.

Announcing the deprecation of Ad Exchange Buyer II API

The Ad Exchange Buyer II API is now deprecated, and the following resources will be sunset on September 29th, 2023:

Accessing the sunset resources will return an error response following the sunset date. Note that RTB Troubleshooting resources aren’t included in this list, and will continue to be supported until further notice.

To continue programmatically accessing your Client Access and Marketplace configurations, you should migrate to the Authorized Buyers Marketplace API. For more information, we recommend that you review the Marketplace guide and samples. If you have any questions or feedback, feel free to reach out to us via the Authorized Buyers API Forum.

Removing support for PHP 7 in the Google Ads API client library for PHP

In July 2023, the Google Ads API client library for PHP will start requiring PHP version 8.0 or higher. The version of the client library that adds support for the Google Ads API v14 will be the last version that supports PHP 7. We’ll still fix security issues for this client library version until the Google Ads API v14 is sunset, but no new features will be added.

All PHP 7 versions reached their end of life in 2022. The PHP development team no longer provides security fixes for these versions, so we highly recommend migrating to newer versions as soon as possible.

Here are useful resources to help with the PHP migration: If you have any questions regarding this change, feel free to comment directly on the GitHub issue.

Rescheduled changes to targeting expansion in Display & Video 360 API and Structured Data Files

On March 25, 2023, optimized targeting will gradually begin replacing targeting expansion for all display, video, and audio line items in Display & Video 360. By mid-April, optimized targeting will be live for all partners. These changes will be reflected in Display & Video 360 API and Structured Data Files (SDF), and might impact your existing implementation and the success of your requests.

Similar changes were previously announced and subsequently postponed late last year, but these rescheduled changes have some important differences. Please read this blog post in its entirety if you use the targetingExpansion field in the Display & Video 360 API or the “Audience Targeting - Similar Audiences” column in SDF to configure your Display & Video 360 line items.

Changes in the Display & Video 360 API

Optimized targeting will be configured using the existing targetingExpansion field and TargetingExpansionConfig object in Display & Video 360 API LineItem resources. Once optimized targeting replaces targeting expansion for your partner, these fields will be used to manage optimized targeting in the following ways:

  • The targetingExpansionLevel field will only support two possible values:
    • NO_EXPANSION: optimized targeting is off.
    • LEAST_EXPANSION:optimized targeting is on.
  • Optimized targeting will not automatically be turned on for eligible line items created or updated by the Display & Video 360 API. NO_EXPANSION will be the default value for the targetingExpansionLevel field and will be automatically assigned if you do not set the field.
  • If you set targetingExpansionLevel to one of the following values, it will automatically be reset to LEAST_EXPANSION:
    • SOME_EXPANSION
    • BALANCED_EXPANSION
    • MORE_EXPANSION
    • MOST_EXPANSION
  • excludeFirstPartyAudience will be deprecated. If set to true, it will automatically be reset to false.
  • If you turn on optimized targeting for an ineligible line item, the request will not return an error and the change will persist. However, you must update the line item to be eligible before it will use optimized targeting when serving.

We will also update the configurations of existing line items as follows:

To aid in this migration, we are adding a new LineItemWarningMessage value to Display & Video 360 API v1 and v2. The warning value DEPRECATED_FIRST_PARTY_AUDIENCE_EXCLUSION will be added to the warningMessages field of line items that have excludeFirstPartyAudience set to true.

Changes in the Structured Data Files

Targeting expansion is currently set using the “Audience Targeting - Similar Audiences” column in Line Item and Insertion Order SDF formats. These columns will be deprecated when optimized targeting replaces targeting expansion. When downloading SDFs, this column will always be set to FALSE and when uploading SDFs, the value of this column will be ignored.

Eligible line items created using SDF upload will have optimized targeting turned off by default. You will not be able to manage optimized targeting configurations using existing SDF versions and must instead use the Display & Video 360 UI or API.

Upcoming SDF v6 will support optimized targeting configurations. The SDF v6 launch will be announced on the Google Ads Developer Blog and in the SDF release notes.

Preparing for these changes

To prepare for these changes, we recommend the following:

  • Turn on automated bidding for line items currently using fixed bidding with targeting expansion before March 25, 2023 so that they are eligible for optimized targeting.
  • Update your Display & Video 360 API integration to directly exclude any first-party audiences using audience targeting before March 25, 2023 to account for the deprecation of the excludeFirstPartyAudience field.
  • Update your Structured Data Files integration to no longer use the “Audience Targeting - Similar Audiences” column in Line Item and Insertion Order SDFs before March 25, 2023 to account for the column deprecation.

If you have questions regarding these changes or need help with these new features, please contact us using our support contact form.

Google Ads API v11 sunset reminder

Google Ads API v11 will sunset on March 29, 2023. After this date, all v11 API requests will begin to fail. Please migrate to a newer version prior to March 29, 2023 to ensure your API access is unaffected.

We've prepared various resources to help you with the migration: In addition, using the Google Cloud Console, you can view the list of methods and services to which your project recently submitted requests:
  1. Open the Dashboard page (found under APIs & Services) in the Google Cloud Console.
  2. Click on Google Ads API in the table.
  3. On the METRICS subtab, you should see your recent requests plotted on each graph. At the bottom of the page, you’ll see the Methods table, where you can see which methods you’ve sent requests to. The method name includes a Google Ads API version, a service, and a method name, e.g., google.ads.googleads.v11.services.GoogleAdsService.Mutate. In this way, you can see all versions that you’ve used recently.
  4. (Optional) Click on the time frame at the top right of the page if you need to change it.
If you have questions while you’re upgrading, please reach out to us on the forum or at [email protected]gle.com.

Changes to location targeting in Google Ads Search, Shopping, Display, and Performance Max campaigns

Starting on April 14, 2023, there will be changes made to the location targeting settings for Search, Shopping, Display, and Performance Max campaigns in the Google Ads API. We are making this change to simplify the location targeting portfolio and improve advertiser performance. All versions will throw errors if you try to set the location target settings to one of the values shown below.

Campaign.geo_target_type_setting fields
positive_geo_target_type can no longer be set to SEARCH_INTEREST for Search, Shopping, and Display campaigns. The default value is PRESENCE_OR_INTEREST.
negative_geo_target_type can no longer be set to PRESENCE_OR_INTEREST for Performance Max, Search, Shopping, and Display campaigns. The default value is PRESENCE.
The error returned if these values are used is SettingError.SETTING_VALUE_NOT_COMPATIBLE_WITH_CAMPAIGN.

On April 24, 2023, we will start performing any necessary auto-migration of fields to the new default values until no more invalid combinations exist. The auto-migration will occur on a per-campaign basis. You can confirm that the migration is complete for a Google Ads account by checking that these two queries return zero rows.


SELECT campaign.id, campaign.geo_target_type_setting.positive_geo_target_type, campaign.advertising_channel_type FROM campaign WHERE campaign.advertising_channel_type IN ('DISPLAY', 'SEARCH', 'SHOPPING') AND campaign.geo_target_type_setting.positive_geo_target_type = 'SEARCH_INTEREST' LIMIT 1
SELECT campaign.id, campaign.advertising_channel_type, campaign.geo_target_type_setting.negative_geo_target_type FROM campaign WHERE campaign.geo_target_type_setting.negative_geo_target_type = 'PRESENCE_OR_INTEREST' AND campaign.advertising_channel_type IN ('DISPLAY', 'PERFORMANCE_MAX', 'SEARCH', 'SHOPPING') LIMIT 1
Where can I get support?
If you have questions, please reach out to us on the forum or at [email protected].

Updating Display & Video 360 API creative asset media ID values on April 5, 2023

On April 5, 2023, we will be updating mediaId values in the Display & Video 360 API for all uploaded Asset resources and requiring that customers use these new ID values when associating assets with Creative resources.

What is changing?

We are changing the ID space that is used to identify creative assets. This means that assets previously uploaded to Display & Video 360, such as image, video, and HTML files, will now have new IDs.

This change will have the following effects:

  • Existing mediaId values of assets associated with a creative resource through the assets field will automatically be updated to use this new ID space.
  • Attempting to use any previously generated mediaId values to associate an asset to a creative will return an error.

What do I need to do?

In preparation for this change, we recommend that you stop using any cached media IDs when creating or updating creatives, and instead upload assets immediately before using them for creative production.

After April 5, 2023, we recommend updating any cached media IDs to the new values by retrieving them from associated creative resources or re-uploading them using advertisers.assets.upload.

If you are not caching media IDs, you do not need to do anything in regards to this change.

If you have questions regarding this change, please contact us using our support contact form.

Announcing v202302 of the Google Ad Manager API

We're pleased to announce that v202302 of the Google Ad Manager API is available starting today, February 21st. This release brings a number of new features for Reporting including Yield Group metrics, Programmatic metrics, and time zone support.

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.

Bid Manager API v1.1 will sunset on April 27, 2023

The Bid Manager API v1.1 will sunset on April 27, 2023. The Bid Manager API v1.1 was deprecated in August 2022 and originally scheduled to sunset on February 28, 2023.

Please migrate to v2 before the sunset date to avoid an interruption of service.

You can read our release notes for more information about v2. Follow the steps in our v2 migration guide to help you migrate from v1.1 to v2.

If you run into issues or need help with your migration, please contact us using our support contact form.