Tag Archives: google_ads_scripts

Support for Responsive Video Ads in Scripts

Today we’re launching support for responsive video ads in Google Ads scripts. If you were using the TrueView for action campaign type, you must update your code to use the new video ad type. If you don’t update, your code will begin throwing errors starting approximately October 10, 2021. The old TrueView for action campaign type is being renamed to Video action campaign along with this change.

You can update your selectors with a new withCondition clause to separate Video action campaigns from other video campaign types in your code.

To get campaigns with the video action type:

AdsApp.videoCampaigns()
.withCondition("AdvertisingChannelSubType = VIDEO_ACTION")
.get();
Or to get video campaigns of other types, which are unaffected by this change:

AdsApp.videoCampaigns()
.withCondition("AdvertisingChannelSubType != VIDEO_ACTION")
.get();
Once you've identified that you're acting on a Video action campaign, create a new type of ad group that can house responsive video ads, and then construct a new type of ad at ad creation time. For other types of video campaigns, this new ad type isn’t available.

For creating the ad group, if you were using:

videoCampaign.newVideoAdGroupBuilder().withAdGroupType("VIDEO_TRUE_VIEW_IN_STREAM")
Then update that code to:

videoCampaign.newVideoAdGroupBuilder().withAdGroupType("VIDEO_RESPONSIVE")
For creating the ads themselves, if you were using:

adGroup.newVideoAd().inStreamAdBuilder()
Then update that code to:

adGroup.newVideoAd().responsiveVideoAdBuilder()
Check out the reference documentation for the new responsiveVideoAdBuilder for details on its fields and methods.

If you have any questions, please leave a post on our forum so that we can help.

Google Ads API, Google Ads scripts, and AdWords API issues on Oct 1

Between 2:50 am EDT and 6:40 am EDT on October 1, there was an outage that may have prevented some users from accessing the Google Ads API, Google Ads scripts, & the AdWords API. If you were using the Google Ads API or the AdWords API or running Google Ads scripts, then you may have experienced slowness or timeouts. Please check for any failed requests from these tools during the outage.

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

Google Apps Script & Google Ads scripts now support Content API v2.1 by default

Going forward, if you use Content API for Shopping through Google Apps Script or Google Ads scripts, new scripts will use Content API v2.1 by default. This change is part of the deprecation of Content API for Shopping v2, scheduled for sunset on September 30th, 2021, after which scripts that depend on v2 features won’t work.

If you currently have a Google Apps script or Google Ads script that uses Content API for Shopping v2, then we strongly recommend you migrate to v2.1. Please note that some methods and fields in v2 are no longer supported in v2.1 (for example Inventory.set), so check the availability of methods and fields you use when you migrate. See the migration guide for more detail.

If you need help implementing this change, please visit the Content API for Shopping forum.

Try the new Google Ads scripts experience

Today we’re launching the beta version of the new Google Ads scripts experience. Existing scripts won’t be affected, but if you're interested in trying some new features and performance improvements, you can opt in on an individual script basis. To do so, open your script and switch on the new scripts experience (Beta) toggle above the code:

The code works on the same interface you've been using all along, so your existing scripts will be compatible with minimal changes.

Some highlight features include:
  • 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.
  • More control over setting up and maintaining bidding strategies.
The beta doesn’t currently support manager account scripts or bulk uploads, but watch out for those features in a future update.

See our developers site for full information on the new experience, including migration information, performance improvements, and updated best practices.

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

Updating Bulk Upload in Google Ads Scripts

We have just launched a new backend for bulk uploads in Google Ads Scripts. Starting today, you can opt into the new experience by specifying the useLegacyUploads flag when creating a new bulk upload:

var upload = AdsApp.bulkUploads().newCsvUpload(columns,
{useLegacyUploads: false});
For now, if you don't specify a value, the default will be true, which will result in no change of behavior from before this feature. Starting on July 12, 2021 we will change the default to false, but you can still opt out for a time by explicitly passing useLegacyUploads as true. On February 1, 2022, we will disable the use of legacy uploads altogether.

We have tried to make the changes here as backwards-compatible as possible, so in most cases your existing uploads should continue to work fine even on the new backend. However, creating video ads which specify a media ID will cease working on the legacy uploads on or after July 12, when we change the default, so if those are important fields to you, make sure you do not manually override to use legacy uploads.

The new backend is exactly compatible with UI-based bulk uploads, which is an improvement over the existing bulk upload system where many columns have different names. This should make it significantly easier to set up bulk uploads by basing the format from the UI. Additionally, a few new features are available, including label manipulation and updating manager accounts.

If you have any questions, please leave a post on our forum so that we can help.

Sunsetting the KEYWORD_MATCH_TYPE recommendation type

On July 21, 2021, all existing recommendations of the type KEYWORD_MATCH_TYPE will be removed and no new recommendations of this type will be generated anymore.

What's changing?
The KEYWORD_MATCH_TYPE recommendations will no longer be returned by search for all versions of the Google Ads API and Google Ads scripts.

All requests sent to apply or dismiss KEYWORD_MATCH_TYPE recommendations will fail with RequestError.RESOURCE_NOT_FOUND errors for all versions of the Google Ads API.

What do you need to do?
Before July 21, 2021, ensure that the changes described above will not lead to any issues in your code or application.

Then, as soon as you can, remove any references of the field Recommendation.keyword_match_type_recommendation and the type KeywordMatchTypeRecommendation in your code. They will be deprecated and removed in future versions.

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

Sunsetting the KEYWORD_MATCH_TYPE recommendation type

On July 21, 2021, all existing recommendations of the type KEYWORD_MATCH_TYPE will be removed and no new recommendations of this type will be generated anymore.

What's changing?
The KEYWORD_MATCH_TYPE recommendations will no longer be returned by search for all versions of the Google Ads API and Google Ads scripts.

All requests sent to apply or dismiss KEYWORD_MATCH_TYPE recommendations will fail with RequestError.RESOURCE_NOT_FOUND errors for all versions of the Google Ads API.

What do you need to do?
Before July 21, 2021, ensure that the changes described above will not lead to any issues in your code or application.

Then, as soon as you can, remove any references of the field Recommendation.keyword_match_type_recommendation and the type KeywordMatchTypeRecommendation in your code. They will be deprecated and removed in future versions.

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

Updating Default Reporting Versions in Google Ads Scripts

In the coming weeks, we'll be changing how we update the default reporting version for search and report requests that use the Google Ads Query Language in Google Ads scripts. This will allow you access to new reporting features as they are released, rather than our previous cadence of holding off on new versions for up to a few months. If you are still using AdWords API based reporting in v201809, these changes will not affect you.

We will be updating the default reporting version for Google Ads API-backed reports to use the newest version of the Google Ads API within two weeks of that version's release. So for example, whenever v8 releases, we will be updating the default reporting version for report calls using GAQL, and all search calls, to use v8 within two weeks of that time.

If you think that this may negatively affect your scripts, and you want to pin to a specific version, you can still manually specify a version which will override the default and will not update until you are ready to move on to the next version. If you do this, be on the lookout for when Google Ads API sunsets versions, because that will cause your scripts to fail until you update to a newer version. Here are examples of setting an API version.

For reports:

var report = AdsApp.report(query, {apiVersion: 'v7'});
For search:

var results = AdsApp.search(query, {apiVersion: 'v7'});
As part of this rollout, we will be updating the default (which is currently v5) to v7 shortly after this post. You can find a full list of reporting upgrades made in v6 and v7 on the Google Ads API release notes page.

If you have any questions, please leave a post on our forum so that we can help.

AdWords API and Scripts: Deprecation of Automatic Placements in the Placement Performance Report

Starting June 10, 2021, the Placement Performance Report for the AdWords API and Google Ads scripts will exclude automatic placements according to data retention policy changes. Afterwards, the Placement Performance Report will only contain the data for managed and excluded placements at the ad group level.

What's changing?
The schema (attributes, segments and metrics) of the Placement Performance Report will remain the same, but only the data for managed and excluded placements will be available. The data for automatic placements that have not been explicitly targeted will be removed from this report, and queries for the automatic placements data (WHERE Id = 0) from this report will return empty results.

Who will be impacted?
All developers that access the Placement Performance Report using the AdWords API or Google Ads scripts today for automatic placements reporting will be affected.

What should you do?
Before June 10, 2021, review and modify the reporting queries in your AdWords API and Google Ads scripts applications to use the Automatic Placement Performance Report instead for automatic placements reporting.

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

AdFormat in Search Query Performance Report will start returning UNKNOWN starting 2021-05-12

On 2021-05-12 we will deprecate the  AdFormat column in the Search Query Performance Report for AdWords API and Google Ads scripts. From then onwards, the report will return UNKNOWN for this field. This does not affect the Google Ads API.

The AdFormat column provides the type of creative that was triggered such as text, image, or video. If you still require this information, you can instead select AdGroupId and CreativeId from the same report, then call AdGroupAdService.get() to retrieve the Ad.type field.

This completes the migration that was started in January 2020 to remove AdFormat from all reports.

If you have any questions about this or anything else related to the AdWords API, please reach out to our support team on the forum.

Nick Birnie, Google Ads API Team