AdWords scriptで検索クエリからのキーワード自動追加したい
keywordの追加のスクリプトはあるのですが、
検索クエリから抽出する方法がわからず、どの様なものになりますでしょうか?
keyword追加のscript
function addKeyword() {
// If you have multiple adGroups with the same name, this snippet will
// pick an arbitrary matching ad group each time. In such cases, just
// filter on the campaign name as well:
//
// AdsApp.adGroups()
// .withCondition('Name = "INSERT_ADGROUP_NAME_HERE"')
// .withCondition('CampaignName = "INSERT_CAMPAIGN_NAME_HERE"')
var adGroupIterator = AdsApp.adGroups()
.withCondition('Name = "INSERT_ADGROUP_NAME_HERE"')
.get();
if (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
adGroup.newKeywordBuilder()
.withText('Hello world')
.withCpc(1.25) // Optional
.withFinalUrl('http://www.example.com') // Optional
.build();
// KeywordBuilder has a number of other options. For more details see
// https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_keywordbuilder
}
}
0