When i try to create a new VideoDiscoveryAd with long YouTube video title and using short Headline
withHeadline("short title")
, i get error that the Title is too long.
It means that the method withHeadline does not replace YouTube video title before validation.
How to solve this problem?
My code:
getVideo: function (youTubeVideoId) {
var mediaOperation = AdWordsApp.adMedia().newVideoBuilder()
.withYouTubeVideoId(youTubeVideoId)
.build();
var video = mediaOperation.getResult();
return video;
}
var video = getVideo(youTubeVideoId);
videoAdGroup.newVideoAd().videoDiscoveryAdBuilder()
.withAdName(youTubeVideoId)
.withDescription1(descriptionOne)
.withDescription2(descriptionTwo)
.withHeadline("short title")
.withThumbnail("DEFAULT")
.withDestinationPage("WATCH")
.withVideo(video)
.build();