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

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

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

请确保您熟悉更改策略,因为本指南仅提供要在更改中使用的 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 创建产品广告。

如需制作广告组广告,请使用 AdGroupAdOperation,并采用在上一步中创建的相同广告组 ID 变量。

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