องค์ประกอบที่จำเป็นของ Performance Max

หากต้องการสร้างแคมเปญ Performance Max ใหม่ตั้งแต่ต้น คุณต้องสร้างสิ่งต่อไปนี้เป็นอย่างน้อย

แคมเปญและงบประมาณมีประโยชน์ในการสร้างแคมเปญทุกประเภท ส่วนการดำเนินการที่เกี่ยวข้องกับชิ้นงานจะมีประโยชน์อย่างยิ่งในการสร้างแคมเปญ Performance Max

โปรดทําความคุ้นเคยกับกลยุทธ์การปรับเปลี่ยน เนื่องจากคู่มือนี้จะให้เฉพาะออบเจ็กต์ JavaScript ที่จะใช้ในการเปลี่ยนแปลง

งบประมาณ

งบประมาณต้องไม่แชร์และต้องไม่ซ้ำกันในบัญชี ใช้ CampaignBudgetOperation

const budgetOperation = {
  "campaignBudgetOperation": {
    "create": {
      "resourceName": `customers/${customerId}/campaignBudgets/${getNextTempId()}`,
      "name": "Performance Max campaign budget",
      "amountMicros": "50000000",
      "deliveryMethod": "STANDARD",
      "explicitlyShared": false
    }
  }
}
operations.push(budgetOperation);

แคมเปญ

แคมเปญต้องอ้างอิงงบประมาณที่สร้างไว้ก่อนหน้านี้ ดังนั้นนอกเหนือจากการระบุชื่อทรัพยากรของตนเองด้วยรหัสชั่วคราวแล้ว คุณจะต้องมีชื่อทรัพยากรที่ตรงกันทุกประการกับที่ตั้งไว้ในขั้นตอนก่อนหน้าเพื่อสร้างแคมเปญ เพื่อให้คุณระบุงบประมาณที่สร้างไว้ก่อนหน้านี้ในคําขอนี้ได้โดยไม่ซ้ำกัน ใช้ CampaignOperation

const campaignOperation = {
  "campaignOperation": {
    "create": {
      "resourceName": `customers/${customerId}/campaigns/${getNextTempId()}`,
      "name": "Performance Max campaign",
      "status": "PAUSED",
      "advertisingChannelType": "PERFORMANCE_MAX",
      "campaignBudget": budgetOperation.campaignBudgetOperation.create.resourceName,
      "biddingStrategyType": "MAXIMIZE_CONVERSION_VALUE",
      "startDate": "20240314",
      "endDate": "20250313",
      "urlExpansionOptOut": false,
      "maximizeConversionValue": {
        "targetRoas": 3.5
      }
    }
  }
}
operations.push(campaignOperation);

กลุ่มชิ้นงาน

กลุ่มชิ้นงานสําหรับแคมเปญนี้ต้องมีการอ้างอิงถึงแคมเปญ และจะต้องอ้างอิงในภายหลังเมื่อคุณลิงก์ชิ้นงานกับกลุ่ม ใช้ AssetGroupOperation

const assetGroupOperation = {
  "assetGroupOperation": {
    "create": {
      "resourceName": `customers/${customerId}/assetGroups/${getNextTempId()}`,
      "campaign": campaignOperation.campaignOperation.create.resourceName,
      "name": "Performance Max asset group",
      "finalUrls": [
        "http://www.example.com"
      ],
      "finalMobileUrls": [
        "http://www.example.com"
      ],
      "status": "PAUSED"
    }
  }
}
operations.push(assetGroupOperation);

เมื่อคุณมีกลุ่มชิ้นงานและชิ้นงานแล้ว (จากขั้นตอนก่อนหน้า) คุณจะต้องลิงก์กลุ่มชิ้นงานและชิ้นงานเข้าด้วยกันเพื่อให้แคมเปญ Performance Max ทราบว่าคุณต้องการใช้ชิ้นงานใด คุณต้องต้องทําในคําขอเดียวกับที่สร้างกลุ่มชิ้นงานในตอนแรก โดยให้ใช้ AssetGroupAssetOperation

คุณจะต้องระบุชื่อทรัพยากรชิ้นงานที่ถูกต้อง รวมถึงแก้ไข fieldType เป็นค่าที่เหมาะสมสำหรับชิ้นงานที่ลิงก์ ดูรายการประเภทฟิลด์ทั้งหมดที่ใช้ได้

คุณจะต้องดําเนินการเหล่านี้หลายครั้งเพื่อให้เป็นไปตามข้อกําหนดขั้นต่ำสําหรับแคมเปญ Performance Max

operations.push({
  "assetGroupAssetOperation": {
    "create": {
      "assetGroup": assetGroupOperation.assetGroupOperation.create.resourceName,
      // assetResourceName here is a placeholder; you will need to determine
      // the correct resource name to use depending on which asset you want
      // to add to the asset group.
      "asset": assetResourceName,
      "fieldType": "HEADLINE"
    }
  }
});