Friday, October 1, 2021

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.