Google Adwords 自动生成 ExpandedTextAd
Google Adwords auto generating ExpandedTextAd
我正在尝试在 GoogleAdWords 上更新我的脚本,它会创建 adGroup
,然后生成关键字和 expandedTextAd
并将其插入到该组中。问题是脚本生成 expandedTextAd
的地方。我总是收到错误 There are illegal characters in the string.
我尝试从链接中删除协议,删除空格,使用
function addExpandedTextAds(adGroupName,i ,data) {
var adGroupIterator = AdWordsApp.adGroups()
.withCondition('Name = ' + adGroupName)
.get();
if (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
if (data[i].originCity.length < 11){
var originCity = data[i].originCity;
}
else
{
var originCity = data[i].originIATA;
}
var finalUrl = data[i].finalUrl;
adGroup.newAd().expandedTextAdBuilder()
.withHeadlinePart1('Book Jets from '+ data[i].originIATA)
.withHeadlinePart2('Book it now on')
.withDescription('Get instant fixed prices from ' + data[i].originIATA)
.withFinalUrl(finalUrl)
.withPath1('url.com/' + data[i].originIATA)
.build();
}
}
但如果我使用旧方法 ad
创建一切正常。
adGroup.newTextAdBuilder()
.withHeadline('Private Jet from '+ data[i].originIATA )
.withDescription1('Hire jet in ' + data[i].originIATA + ' for up to ' + data[i].pax + ' people')
.withDescription2('Fixed-price booking from ' + data[i].flightSalePrice)
.withDisplayUrl('https://www.url.com/' + data[i].originIATA )
.withFinalUrl(data[i].finalUrl)
.build();
由于 Note: Creation of text ads using AdGroup.newTextAdBuilder() is deprecated, and will no longer be supported after January 31, 2017. Existing text ads may be retrieved and will continue to serve as usual into 2017.
在 GoogleAdWordsDocs
上进行了更新
寻求您的帮助,因为我不知道该怎么做,花了 6 个多小时才找到解决方案,但没有找到。
路径字段不得包含以下任何字符:/:;,.<>
虽然官方手册上没有说明,但是在AdWords编辑器中查看好像是错误的。
我正在尝试在 GoogleAdWords 上更新我的脚本,它会创建 adGroup
,然后生成关键字和 expandedTextAd
并将其插入到该组中。问题是脚本生成 expandedTextAd
的地方。我总是收到错误 There are illegal characters in the string.
我尝试从链接中删除协议,删除空格,使用
function addExpandedTextAds(adGroupName,i ,data) {
var adGroupIterator = AdWordsApp.adGroups()
.withCondition('Name = ' + adGroupName)
.get();
if (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
if (data[i].originCity.length < 11){
var originCity = data[i].originCity;
}
else
{
var originCity = data[i].originIATA;
}
var finalUrl = data[i].finalUrl;
adGroup.newAd().expandedTextAdBuilder()
.withHeadlinePart1('Book Jets from '+ data[i].originIATA)
.withHeadlinePart2('Book it now on')
.withDescription('Get instant fixed prices from ' + data[i].originIATA)
.withFinalUrl(finalUrl)
.withPath1('url.com/' + data[i].originIATA)
.build();
}
}
但如果我使用旧方法 ad
创建一切正常。
adGroup.newTextAdBuilder()
.withHeadline('Private Jet from '+ data[i].originIATA )
.withDescription1('Hire jet in ' + data[i].originIATA + ' for up to ' + data[i].pax + ' people')
.withDescription2('Fixed-price booking from ' + data[i].flightSalePrice)
.withDisplayUrl('https://www.url.com/' + data[i].originIATA )
.withFinalUrl(data[i].finalUrl)
.build();
由于 Note: Creation of text ads using AdGroup.newTextAdBuilder() is deprecated, and will no longer be supported after January 31, 2017. Existing text ads may be retrieved and will continue to serve as usual into 2017.
在 GoogleAdWordsDocs
上进行了更新
寻求您的帮助,因为我不知道该怎么做,花了 6 个多小时才找到解决方案,但没有找到。
路径字段不得包含以下任何字符:/:;,.<>
虽然官方手册上没有说明,但是在AdWords编辑器中查看好像是错误的。