รายการแนะนำ

Google Ads จะสร้างคำแนะนำโดยอัตโนมัติและให้แนวทางในการเพิ่มประสิทธิภาพบัญชี เช่น การเพิ่มงบประมาณแคมเปญสำหรับแคมเปญที่ถูกจำกัด หรือการเพิ่มคีย์เวิร์ดที่เกี่ยวข้อง ดูรายการประเภทคําแนะนําทั้งหมดได้ในเอกสารประกอบเกี่ยวกับ 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();
  }
}