需求开发广告系列的必需组件

如需从头开始制作新的需求开发广告系列,您至少必须创建以下内容:

广告系列和预算可用于制作各种类型的广告系列,而广告组广告中的某些设置则特别适合制作需求开发广告系列。请访问需求开发广告素材资源指南,了解如何使用脚本创建素材资源。

请务必熟悉变异策略,因为本指南仅提供要在变异中使用的 JavaScript 对象。

预算

预算不得为共享预算,且在您的账号中必须具有唯一名称。对于以促成转化为目标的出价策略,最佳做法是将每日预算设置为预期每次转化费用的 15 倍以上。对于基于价值的出价策略,请将每日预算设置为大于 20 倍的预期平均转化价值/目标广告支出回报率。使用 CampaignBudgetOperation 创建预算。

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

广告系列

广告系列必须引用预算,因此您需要使用在上一步中创建的确切预算资源名称来识别和使用该特定预算对象。使用 CampaignOperation

const campaignOperation = {
  "campaignOperation": {
    "create": {
      "resourceName": `customers/${customerId}/campaigns/${getNextTempId()}`,
      "name": "Demand Gen campaign",
      "status": "PAUSED",
      "advertisingChannelType": "DEMAND_GEN",
      "campaignBudget": budgetOperation.campaignBudgetOperation.create.resourceName,
      "biddingStrategyType": "TARGET_CPA",
      "startDate": "20240314",
      "endDate": "20250313",
      "urlExpansionOptOut": false,
      "targetCpa": {
        "targetCpaMicros": 1000000
      },
      "containsEuPoliticalAdvertising": "DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING"
    }
  }
}
operations.push(campaignOperation);

Google Ads 广告组

广告组必须引用广告系列,因此您需要上一步中创建的确切广告系列资源名称,以便识别和使用该广告系列对象。您还需要为广告组本身提供临时 ID,最好将其存储为新变量,以便在制作广告组广告时使用。

为需求开发广告系列制作广告组时,您还可以配置渠道控制选项,以决定广告的展示位置。与其他一些广告系列类型不同,需求开发广告系列建议每个广告系列包含多个广告组,因为系统会根据广告组的效果分配预算。目前,您只能使用 AdGroupOperation 创建一个广告组。

const adGroupId = getNextTempId();
const adGroupOperation = {
  "adGroupOperation": {
    "create": {
      "resourceName": `customers/${customerId}/adGroups/${adGroupId}`,
      "name": "Demand Gen ad group",
      "status": "PAUSED",
      "campaign": campaignOperation.campaignOperation.create.resourceName,
      "demand_gen_ad_group_settings": {
        "channel_controls": {
          "selected_channels": {
            "gmail": false,
            "discover": false,
            "display": false,
            "youtube_in_feed": true,
            "youtube_in_stream": true,
            "youtube_shorts": true
          }
        }
      }
    }
  }
}
operations.push(adGroupOperation);

包含嵌套广告的广告组广告

此步骤会创建广告组广告,将广告组与广告相关联。广告组广告必须引用广告组,因此您需要使用在上一步中设置的确切资源名称。您可以在同一操作中创建广告。 此处显示的示例使用 DemandGenVideoResponsiveAdInfo 创建需求开发视频自适应广告,您也可以调整此示例,使用 DemandGenMultiAssetAdInfo 创建多素材资源广告,使用 DemandGenCarouselAdInfo 创建轮播广告,或使用 DemandGenProductAdInfo 创建产品广告。

若要创建广告组广告,请使用与上一步中创建的广告组 ID 变量相同的 AdGroupAdOperation

const adGroupAdOperation = {
  "adGroupAdOperation": {
    "create": {
      "resourceName": `customers/${customerId}/adGroupAds/${adGroupId}~${getNextTempId()}`,
      "adGroup": adGroupOperation.adGroupOperation.create.resourceName,
      "status": "PAUSED",
      "ad": {
        "name": "Demand Gen video responsive ad",
        "finalUrls": [
          "http://www.example.com"
        ],
        "demandGenVideoResponsiveAd": {
          "businessName": {
            "text": "Demand Gen business"
          },
          "videos": [
            { "asset": videoAsset.assetOperation.create.resourceName }
          ],
          "logoImages": [
            { "asset": imageAsset.assetOperation.create.resourceName }
          ],
          "headlines": [
            { "text": "Demand Gen responsive video" }
          ],
          "longHeadlines": [
            { "text": "Make a Demand Gen video responsive ad today" }
          ],
          "description": [
            { "text": "This is an example of a Demand Gen video responsive ad"}
          ]
        }
      }
    }
  }
}
operations.push(adGroupAdOperation);