最高成效廣告活動的必要要素

如要從頭開始建立新的最高成效廣告活動,您至少必須建立下列項目:

廣告活動和預算在建立各種廣告活動類型時很實用,而素材資源相關作業則特別適合用來建立最高成效廣告活動。

請務必熟悉變更策略,因為本指南只會提供用於修改作業的 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);

廣告活動

廣告活動必須參照先前建立的預算,因此除了利用臨時 ID 指定自己的資源名稱之外,您還需要在建立廣告活動時,使用在上一步設定的資源名稱,才能明確識別先前在此要求中建立的預算。使用 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);

您現已取得素材資源群組和 (上個步驟) 的素材資源,因此您需要將這些素材資源群組連結在一起,讓最高成效廣告活動知道您想使用哪些素材資源。您必須在一開始建立素材資源群組的要求中執行這項操作。方法是使用 AssetGroupAssetOperation

您需要提供正確的資產資源名稱,並將 fieldType 修改為待連結資產的適當值。請參閱有效欄位類型的完整清單

您必須進行多項作業,才能符合最高成效廣告活動的基本規定

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