Tag Archives: google_ads_scripts

Upcoming change to LowerTargetRoas recommendations in the Google Ads API and Google Ads scripts

As of v17 of the Google Ads API, recommendations of type LOWER_TARGET_ROAS have included a current_average_target_micros as a whole currency value instead of a micros value (where one million is equivalent to one currency unit) as indicated by the field name. On April 23, 2025, we are rolling out a fix to populate current_average_target_micros with the micros value.

Note that as a result of the incorrect unit, the currently returned current_average_target_micros value is truncated and is therefore less precise than the micros equivalent. If you were converting the existing value to micros by multiplying by 1,000,000, the resulting value wouldn't necessarily be correct because any digits past the first position are dropped. For example, a current_average_target_micros value of 5 might have been converted to 5,000,000 in micros before the change, but could be returned as 5,750,000 (more precise) after the change.

What do I need to do?

If you use the Google Ads API or Google Ads scripts to query the recommendation resource for recommendations of type LOWER_TARGET_ROAS, and your application logic uses the current_average_target_micros field, you must update your application to treat the value as micros instead of a whole budget value for when the change takes effect on April 23, 2025.

If you have any questions or need help, check out the Google Ads API support page for options.

Google Ads API and Google Ads scripts search term insight report update starting March 3, 2025

Starting on March 3, 2025, the Google Ads API and Google Ads scripts search term insight reports will return all search subcategories as empty. The Google Ads UI already removed this field, and the API is also rolling out this change to be consistent across Google Ads.

What do I need to do?

Starting March 3, 2025, it is expected that all values for segments.search_subcategory will be empty.

If you query segments.search_subcategory in the campaign_search_term_insight or customer_search_term_insight reports, then:

  1. Check that your code can handle an empty value in segments.search_subcategory. An empty string already is a catch-all, so your code should be already handling this.
  2. We recommend removing segments.search_subcategory from your query.

If you have any questions or concerns, you can reach out to us through our support form.

Consent unbundling in Google Ads scripts

Starting in January 2025, we will enable consent unbundling in Google Ads scripts. This is a new feature of OAuth that allows you to customize which specific scopes you want to authorize, rather than the current all-or-nothing approach. Consent unbundling is being rolled out in all Google OAuth applications.

Google Ads scripts already runs a static analysis on your code before presenting the OAuth consent screen, and only requests the specific features that are required to run the script. Therefore, when you authorize Google Ads scripts, ensure that you select all the boxes on that screen, or else you will experience execution errors.

Any existing scripts you already have will continue to work without any user action needed when this feature rolls out, unless you make changes that require reauthorization. Existing unmodified scripts will continue to run as usual.

If you have any questions about consent unbundling or other Google Ads scripts features, please post them in the Google Ads scripts forum.

Subscribe to the blog

If you want all new blog posts sent directly to your inbox, we have good news. The blog includes a customizable RSS feed that you can subscribe to with your favorite RSS service. Just paste the URL above into your RSS service and get the blog contents delivered in whatever way you prefer. If you're new to RSS, check out this community resource on GitHub describing how it works and providing a list of well-supported services.

If you want to filter to specific products that interest you, that's possible too. Here are some quick links to the RSS feeds for the products supported by this blog:

Create Performance Max campaigns in Google Ads scripts

We recently published a new suite of guides on how to create Performance Max campaigns in Google Ads scripts. You can check them out on our developers site.

These guides focus on using the new mutate function, which lets you access most of the features from the full Google Ads API.

By following the pattern established in these guides, you can customize the operations to perform all sorts of tasks automatically with scripts. Check out the mutate strategy section specifically for some general advice applicable to many use cases.

If you have any questions or concerns, you can reach out to us on our forum.

Google Ads scripts updates for v15

In April 2024, we are releasing a new version of Google Ads scripts that is updated to use Google Ads API v15.

Note: Our generic search and mutate methods allow for new API features as soon as they become available, and have been supporting Google Ads API v15 since its release.

As a result of this change, several features that were removed from v15 of the Google Ads API will no longer be available in Google Ads scripts:
  • AdsApp.adMedia() will throw a sunset error. Media is no longer supported. Assets are used instead.
  • ResponsiveDisplayAd would previously return a Media when fetching its marketing image or logo image. Instead, this will now return null.
  • ImageAd.getImage() previously returned a Media. It will now return an Asset instead. This will be a breaking change if you depend on this method.
In addition to these changes, we will be increasing the default reporting version to v15 if you don't manually specify a version.
If you have any questions or concerns, you can reach out to us on our forum.

Announcing New Reporting Script for Performance Max

Today, we’re announcing the publishing of a new pre-written Script for reporting on Performance Max campaign performance in Google Ads scripts. This script will report on your conversions and other performance related metrics for your campaigns. The only thing needed to get it running is to copy the source code into your account and schedule the script to run daily.

How can I get started?
Find the script here.

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

Generic mutate support in Google Ads scripts

We are announcing support for new generic mutate functionality in Google Ads scripts, available today. Most mutate operations that are supported by the Google Ads API can now be performed directly in scripts.


For example, to create a simple budget:
const budgetResult = AdsApp.mutate({
    campaignBudgetOperation: {
        create: {
            amountMicros: 10000000,
            explicitlyShared: false
        }
    }
});
The new functionality enables you to create full campaign hierarchies, new conversion actions, and more that previously was not possible in scripts. For a full list of available operations, check out the MutateOperation reference documentation for the Google Ads API. Note that a few operation types are still restricted in scripts.

Check out the new guide for a complete overview of how to use the feature, including update and remove operations and performing multiple operations in a single call.

Please contact us on our forum or at [email protected] if you have any questions.

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].