需求开发广告组可为广告组中的广告提供精准的出价和投放控制。此功能通过出价
策略、广告资源设置和定位在 AdGroup 资源中进行配置。
广告组具有名为广告的子资源,这些子资源是赢得竞价后投放的已配置广告素材。
选择配置
在创建需求开发广告组之前,请考虑使用以下可选设置,以便进一步控制广告投放:
bidStrategy可以配置为使用DemandGenBiddingStrategy,以便在使用目标每次转化费用、目标 每次点击费用或目标广告支出回报率出价策略时,为广告组设置与父级订单项不同的目标值。adGroupInventoryControl可以设置,以选择广告组将出价的广告资源以及广告将投放的广告资源。targetingExpansion借助 优化型 定位,您可以为使用受众群体定位的广告组启用优化型定位。 优化型定位会将投放范围扩大到您设置的受众特征定位之外。您可以通过排除受众特征扩展功能来限制此功能。
创建需求开发广告组时,您还必须将
adGroupFormat字段设置为AD_GROUP_FORMAT_DEMAND_GEN。
创建广告组
以下介绍了如何使用以下设置创建需求开发广告组:
- 出价策略:优化目标为每次转化费用平均为 12 美元,并从父级订单项继承目标每次转化费用出价策略。
- 仅对 YouTube 插播广告和 Shorts 广告资源出价。
Java
// Provide the ID of the parent advertiser. long advertiserId = advertiser-id; // Provide the ID of the parent line item. long lineItemId = line-item-id; // Provide the display name of the ad group. String displayName = display-name; // Create the ad group structure. AdGroup adGroup = new AdGroup() .setLineItemId(lineItemId) .setDisplayName(displayName) .setAdGroupFormat("AD_GROUP_FORMAT_DEMAND_GEN") .setEntityStatus("ENTITY_STATUS_PAUSED"); // Create and set the bidding strategy. BiddingStrategy biddingStrategy = new BiddingStrategy() .setDemandGenBid(new DemandGenBiddingStrategy().setValue(12000000L)); adGroup.setBidStrategy(biddingStrategy); // Create and set inventory controls. AdGroupInventoryControl inventoryControl = new AdGroupInventoryControl(); SelectedInventories selectedInventories = new SelectedInventories() .setAllowYoutubeStream(true) .setAllowYoutubeShorts(true); inventoryControl.setSelectedInventories(selectedInventories); adGroup.setAdGroupInventoryControl(inventoryControl); // Configure the create request. AdGroups.Create request = service.advertisers().adGroups().create(advertiserId, adGroup); // Create the ad group. AdGroup response = request.execute(); // Display the new ad group. System.out.printf("Demand Gen ad group %s was created.", response.getName());
Python
# Provide the ID of the parent advertiser. advertiser_id = advertiser-id # Provide the ID of the parent line item. line_item_id = line-item-id # Provide the display name of the ad group. display_name = display-name # Create an ad group object with example values. ad_group_obj = { "lineItemId": line_item_id, "displayName": display_name, "entityStatus": "ENTITY_STATUS_PAUSED", "adGroupFormat": "AD_GROUP_FORMAT_DEMAND_GEN", "bidStrategy": { "demandGenBid": { "value": "12000000" } }, "adGroupInventoryControl": { "selectedInventories": { "allowYoutubeStream": True, "allowYoutubeShorts": True, } } } # Build and execute request. response = ( service.advertisers() .adGroups() .create(advertiserId=advertiser_id, body=ad_group_obj) .execute() ) # Display the new ad group. print(f"Demand Gen ad group {response['name']} was created.")
PHP
// Provide the ID of the parent advertiser. $advertiserId = advertiser-id; // Provide the ID of the parent line item. $lineItemId = line-item-id; // Provide the display name of the ad group. $displayName = display-name; // Create the Demand Gen ad group structure. $adGroup = new Google_Service_DisplayVideo_AdGroup(); $adGroup->setLineItemId($lineItemId); $adGroup->setDisplayName($displayName); $adGroup->setAdGroupFormat('AD_GROUP_FORMAT_DEMAND_GEN'); $adGroup->setEntityStatus('ENTITY_STATUS_PAUSED'); // Create and set the bidding strategy. $demandGenBidStrategy = new Google_Service_DisplayVideo_DemandGenBiddingStrategy(); $demandGenBidStrategy->setValue(12000000); $biddingStrategy = new Google_Service_DisplayVideo_BiddingStrategy(); $biddingStrategy->setDemandGenBid($demandGenBidStrategy); $adGroup->setBidStrategy($biddingStrategy); // Create and set the inventory control. $selectedInventories = new Google_Service_DisplayVideo_SelectedInventories(); $selectedInventories->setAllowYoutubeStream(true); $selectedInventories->setAllowYoutubeShorts(true); $inventoryControl = new Google_Service_DisplayVideo_AdGroupInventoryControl(); $inventoryControl->setSelectedInventories($selectedInventories); $adGroup->setAdGroupInventoryControl($inventoryControl); // Call the API, creating the ad group under the advertiser and // line item given. try { $result = $this->service->advertisers_adGroups->create( $advertiserId, $adGroup ); } catch (\Exception $e) { $this->renderError($e); return; } // Display the new ad group. printf('<p>Demand Gen Ad Group %s was created.</p>', $result['name']);