推奨事項

最適化案は 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();
  }
}