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();
}
}