Tag Archives: google_ads_scripts

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

Announcing deprecation and sunset of Similar Audiences

On November 1, 2022, we announced our plans to sunset Similar Audiences in 2023 as we work on simplifying our existing product portfolio and strengthening our future-proof solutions in a changing privacy landscape. We expect to roll out this change in two phases for both Google Ads API and Google Ads scripts:
  1. Starting May 2023: New similar audiences segments will stop being generated, and existing similar audiences segments will no longer be added to campaigns and ad groups. Ad groups and campaigns that already have similar audience segments attached will continue to function as expected.
  2. Starting August 2023: Similar audience segments will be removed from all ad groups and campaigns. You will continue to have access to historical reporting data for similar audience segments from past campaigns.
What is the impact on Google Ads API?
Any requests that mutate entities related to Similar Audiences will start failing with errors. This includes: The data retrieved using GoogleAdsService.Search or GoogleAdsService.SearchStream requests will gradually be depleted of any references to Similar Audiences. This includes queries relying on the reports user_list, audience, combined_audience, and any others that are based on targeting, or conversion values segments or metrics. When we get closer to the sunset date, check out the deprecation and sunset guide for the exact errors that will be thrown.

What is the impact on Google Ads scripts?
Any requests that relate to Similar Audiences are impacted. Mutating requests will start failing with errors and reporting requests will start returning data depleted of any references to Similar Audiences. This includes: What should I do?
We recommend that API users manually migrate and stop using Similar Audiences before May 2023 in their calls to avoid any disruptions. You can refer to the announcement and Help Center article to learn more about migration options.

If you have any questions or need additional help, contact us through the forum or at [email protected].

Performance Max support in Google Ads scripts

Today we're launching support for Performance Max campaigns in Google Ads scripts. This is treated as a brand new campaign type in scripts, similar to how video or shopping campaigns already work.

To get started, check out the performance max campaigns selector on the AdsApp. Once you've selected a PerformanceMaxCampaign, you can perform common operations like pausing or enabling the campaign, as well as selecting and modifying most asset types in asset groups. You cannot modify text assets this way, and you cannot create new campaigns or asset groups through scripts.

Performance Max retail campaigns are supported in only a limited fashion as listing groups cannot be managed via Scripts.

For more information about Performance Max campaigns in general, check out the complete help center article.

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

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.

Get started scripting with Google Ads scripts templates

Today we’re launching scripts templates, a quick and easy way to get started with scripting in Google Ads. Instead of starting your script from scratch, you can choose from a list of templates, edit to fit your account, and deploy them.

To get started, visit the scripts page and click on the plus (+) button, then Start from a template:

Next, pick a template and click Customize to begin editing.

If you have any questions or feedback regarding the new experience, please leave a post on our forum so that we can help.

Google Ads Scripts, AdWords API and Google Ads API reporting issues on April 25 and 26, 2022

Between April 25th 2:32 PM PT and April 26th 12:24 PM PT, there was an issue which may have impacted some read report requests across Google Ads scripts, the AdWords API, and the Google Ads API. If you were using these products to request reporting data for your accounts, then a small percentage of report downloads may have been missing rows or may have had incorrect data in a given row. This issue has been resolved. As a precaution, we recommend running again any reports that you have executed during this period as the missing data has been restored.

If you have any questions, please contact us via the Google Ads API forum or the Google Ads scripts forum.

New Google Ads scripts experience

Today we’re launching the full version of the new Google Ads scripts experience. The beta has been running since June of last year, and now the final batch of features to match the functionality of legacy scripts has been released.

Starting soon, all new scripts will default to the new scripts experience, although you can still disable it on a script by script basis if necessary. Existing scripts won't be affected until September of 2022. After that, we will migrate all scripts to the new experience. You should manually move your scripts over to the new experience before then to ensure continued functionality. We've tried to implement backwards compatibility, but we can't guarantee every script will work without changes, so definitely take some time to confirm yourself.

Here are some highlight features in the new experience:
  • Support for ES6, including let, classes, for..of loops, and more.
  • Improved throughput, meaning you can process more entities in the same amount of time. We've also removed the entity limits on processing, although time limits remain in place.
  • Support for new asset-based extensions.
  • Enhanced bidding strategy support.
The following features are added in this release:
  • Manager account scripts
  • Bulk upload
  • Video campaigns
See the updated Google Ads scripts site for full information on the new experience, including migration information, performance improvements, and updated best practices. This replaces the documentation for the legacy scripts experience, but if you must reference that we will preserve it at a new location until the legacy scripts sunset: https://developers.google.com/google-ads/scripts-legacy

If you have any questions or feedback regarding the new experience, please leave a post on our forum so that we can help.