องค์ประกอบที่จำเป็นของ 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"
    }
  }
});