Hello all.
Im trying to create new RSAs for my adgroup.
the code is as simple as below
(before that I already define headline 1, headline 2, headline 3 etc.
The script worked fine with creating new ETA, but spit out error for new RSA
The error is TypeError: Cannot find default value for object.
What went wrong please?
function AdBuilder(adgroup) {
var adOperation = adgroup.newAd().expandedTextAdBuilder() //creating a new ad
.withHeadlinePart1(headline1)
.withHeadlinePart2(headline2)
.withHeadlinePart3(headline3)
.withDescription(d1)
.withPath1(path1)
.withPath2(path2)
.withFinalUrl(Finalurl)
.build();
var adOperation2 = adgroup.newAd().responsiveSearchAdBuilder() // creating new RSA
.addheadline(headline1, "HEADLINE_1")
.addHeadline(headline2)
.addHeadline(headline3)
.addHeadline(headline4)
.withDescriptions([
d1,
d2
])
.withPath1(path1)
.withPath2(path2)
.withFinalUrl(Finalurl)
.build();
//var ad2 = adOperation.getResult();
}