最適化案は Google 広告によって自動的に生成され、限定公開キャンペーンのキャンペーン予算の増額や、関連性の高いキーワードの追加など、アカウントを最適化する方法のアイデアを提供します。推奨事項の種類の一覧については、Google Ads API のドキュメントをご覧ください。
最適化案を取得する
推奨事項を取得するには、AdsApp.recommendations()
セレクタを使用します。これは他のセレクタと同様に機能し、返す推奨事項の種類に関する条件を指定できます。
const selector = AdsApp.recommendations()
.withCondition('recommendation.type IN (CAMPAIGN_BUDGET)');
const recommendations = selector.get();
推奨事項を適用する
推奨事項を取得したら、次のように適用します。
for (const recommendation of recommendations) {
// Perform whatever check here that works for your use case.
// You can also potentially skip this step if you've sufficiently narrowed
// down what recommendations you're selecting initially with customized
// withCondition clauses in the previous step.
if (shouldApply(recommendation)) {
recommendation.apply();
}
}