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:
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.
AdsApp.videoCampaigns()
.withCondition("AdvertisingChannelSubType != VIDEO_ACTION")
.get();
For creating the ad group, if you were using:
Then update that code to:
videoCampaign.newVideoAdGroupBuilder().withAdGroupType("VIDEO_TRUE_VIEW_IN_STREAM")
For creating the ads themselves, if you were using:
videoCampaign.newVideoAdGroupBuilder().withAdGroupType("VIDEO_RESPONSIVE")
Then update that code to:
adGroup.newVideoAd().inStreamAdBuilder()
Check out the reference documentation for the new responsiveVideoAdBuilder for details on its fields and methods.
adGroup.newVideoAd().responsiveVideoAdBuilder()
If you have any questions, please leave a post on our forum so that we can help.