Chiến dịch Tạo nhu cầu giúp bạn chia sẻ câu chuyện về thương hiệu của mình với mọi người trên các nền tảng trực quan của Google: YouTube (bao gồm cả Shorts), Khám phá, Gmail, Google Maps và Mạng Hiển thị của Google. Chiến dịch Tạo nhu cầu tiếp cận khách hàng trên nhiều điểm tiếp xúc và sử dụng AI của Google để phân phát mẫu quảng cáo cho những đối tượng phù hợp, đồng thời tối ưu hoá chiến lược đặt giá thầu trên toàn bộ phễu, giúp bạn có toàn quyền kiểm soát đối với các thành phần và vị trí đặt quảng cáo của chiến dịch.
Các tài nguyên API chính
Khi quản lý chiến dịch Tạo nhu cầu trong Google Ads API, bạn sẽ làm việc với các tài nguyên và chế độ cài đặt sau:
| Tài nguyên chính | Các trường và chế độ cài đặt chính của chiến dịch Tạo nhu cầu |
|---|---|
CampaignBudget
|
explicitly_shared = false; hỗ trợ ngân sách hằng ngày
(amount_micros) hoặc tổng ngân sách tuỳ chỉnh
(total_amount_micros với
period = CUSTOM_PERIOD).
|
Campaign |
advertising_channel_type = DEMAND_GEN; chiến lược đặt giá thầu
(maximize_conversions,
maximize_conversion_value, target_cpa,
target_roas, target_spend hoặc
target_cpc); shopping_setting không bắt buộc cho
nguồn cấp dữ liệu sản phẩm.
|
AdGroup |
audience_setting.use_audience_grouped;
demand_gen_ad_group_settings.channel_controls (YouTube, Khám phá, Gmail, Maps, Mạng Hiển thị).
|
AdGroupCriterion
|
audience
(AudienceInfo),
location, language và
listing_group
(
ListingGroupInfo).
|
AdGroupAd và
Asset
|
ad.demand_gen_multi_asset_ad,
ad.demand_gen_carousel_ad,
ad.demand_gen_video_responsive_ad hoặc
ad.demand_gen_product_ad.
|
Tạo chiến dịch Tạo nhu cầu
Bạn nên tạo ngân sách, chiến dịch, nhóm quảng cáo, thành phần và quảng cáo Tạo nhu cầu một cách riêng lẻ trong một yêu cầu GoogleAdsService.Mutate duy nhất bằng cách sử dụng mã nhận dạng tài nguyên tạm thời phủ định để các tài nguyên phụ thuộc có thể tham chiếu lẫn nhau:
Java
// The below methods create and return MutateOperations that we later provide to // the GoogleAdsService.Mutate method in order to create the entities in a single // request. Since the entities for a Demand Gen campaign are closely tied to one-another // it's considered a best practice to create them in a single Mutate request; the // entities will either all complete successfully or fail entirely, leaving no // orphaned entities. See: // https://developers.google.com/google-ads/api/docs/mutating/overview List<MutateOperation> operations = new ArrayList<>(); // A utility to create temporary IDs for the resources. AtomicLong tempId = new AtomicLong(-1); // Creates a new campaign budget operation and adds it to the list of operations. String budgetResourceName = ResourceNames.campaignBudget(customerId, tempId.getAndDecrement()); operations.add( MutateOperation.newBuilder() .setCampaignBudgetOperation(createCampaignBudgetOperation(budgetResourceName)) .build()); // Creates a new campaign operation and adds it to the list of operations. String campaignResourceName = ResourceNames.campaign(customerId, tempId.getAndDecrement()); operations.add( MutateOperation.newBuilder() .setCampaignOperation( createDemandGenCampaignOperation(campaignResourceName, budgetResourceName)) .build()); // Creates a new ad group operation and adds it to the list of operations. String adGroupResourceName = ResourceNames.adGroup(customerId, tempId.getAndDecrement()); operations.add( MutateOperation.newBuilder() .setAdGroupOperation( createDemandGenAdGroupOperation(adGroupResourceName, campaignResourceName)) .build()); // Creates the asset operations for the ad. Map<String, String> assetResourceNames = new HashMap<>(); operations.addAll( createAssetOperations(customerId, youTubeVideoId, tempId, assetResourceNames)); // Creates a new ad group ad operation and adds it to the list of operations. operations.add( MutateOperation.newBuilder() .setAdGroupAdOperation( createDemandGenAdGroupAdOperation(adGroupResourceName, assetResourceNames)) .build()); // Creates the service client. try (GoogleAdsServiceClient googleAdsServiceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) { // Sends the mutate request. MutateGoogleAdsResponse response = googleAdsServiceClient.mutate(String.valueOf(customerId), operations); // Prints the results. System.out.printf( "Created campaign with resource name: %s%n", response .getMutateOperationResponses(1) .getCampaignResult() .getResourceName()); System.out.printf( "Created ad group with resource name: %s%n", response .getMutateOperationResponses(2) .getAdGroupResult() .getResourceName()); for (Map.Entry<String, String> entry : assetResourceNames.entrySet()) { System.out.printf( "Created asset with temporary resource name '%s' and final resource name '%s'.%n", entry.getValue(), response .getMutateOperationResponses( operations.indexOf(getOperationForAsset(operations, entry.getValue()))) .getAssetResult() .getResourceName()); } System.out.printf( "Created ad group ad with resource name: %s%n", response .getMutateOperationResponses(operations.size() - 1) .getAdGroupAdResult() .getResourceName()); }
C#
// The below methods create and return MutateOperations that we later provide to // the GoogleAdsService.Mutate method in order to create the entities in a single // request. Since the entities for a Demand Gen campaign are closely tied to one-another // it's considered a best practice to create them in a single Mutate request; the // entities will either all complete successfully or fail entirely, leaving no // orphaned entities. See: // https://developers.google.com/google-ads/api/docs/mutating/overview MutateOperation campaignBudgetOperation = CreateCampaignBudgetOperation(budgetResourceName); MutateOperation campaignOperation = CreateDemandGenCampaignOperation(campaignResourceName, budgetResourceName); MutateOperation adGroupOperation = CreateAdGroupOperation(adGroupResourceName, campaignResourceName); // Send the operations in a single mutate request. MutateGoogleAdsRequest mutateGoogleAdsRequest = new MutateGoogleAdsRequest { CustomerId = customerId.ToString() }; // It's important to create these entities in this order because they depend on // each other, for example the ad group depends on the // campaign, and the ad group ad depends on the ad group. mutateGoogleAdsRequest.MutateOperations.Add(campaignBudgetOperation); mutateGoogleAdsRequest.MutateOperations.Add(campaignOperation); mutateGoogleAdsRequest.MutateOperations.Add(adGroupOperation); mutateGoogleAdsRequest.MutateOperations.AddRange( CreateAssetOperations( videoAssetResourceName, videoId, logoResourceName, client.Config ) ); mutateGoogleAdsRequest.MutateOperations.Add( CreateDemandGenAdOperation( adGroupResourceName, videoAssetResourceName, logoResourceName ) ); MutateGoogleAdsResponse response = googleAdsServiceClient.Mutate(mutateGoogleAdsRequest);
PHP
This example is not yet available in PHP; you can take a look at the other languages.
Python
# The below methods create and return MutateOperations that we later provide # to the GoogleAdsService.Mutate method in order to create the entities in a # single request. Since the entities for a Demand Gen campaign are closely # tied to one-another it's considered a best practice to create them in a # single Mutate request; the entities will either all complete successfully # or fail entirely, leaving no orphaned entities. See: # https://developers.google.com/google-ads/api/docs/mutating/overview mutate_operations: List[MutateOperation] = [ # It's important to create these entities in this order because they # depend on each other, for example the ad group depends on the # campaign, and the ad group ad depends on the ad group. create_campaign_budget_operation(client, budget_resource_name), create_demand_gen_campaign_operation( client, campaign_resource_name, budget_resource_name ), create_ad_group_operation( client, ad_group_resource_name, campaign_resource_name ), *create_asset_operations( # Use iterable unpacking client, video_asset_resource_name, video_id, logo_asset_resource_name, ), create_demand_gen_ad_operation( client, ad_group_resource_name, video_asset_resource_name, logo_asset_resource_name, ), ] # Send the operations in a single mutate request. googleads_service.mutate( customer_id=customer_id, mutate_operations=mutate_operations )
Ruby
operations = [] operations << client.operation.mutate do |m| m.campaign_budget_operation = create_campaign_budget_operation(client, budget_resource_name) end operations << client.operation.mutate do |m| m.campaign_operation = create_demand_gen_campaign_operation(client, campaign_resource_name, budget_resource_name) end operations << client.operation.mutate do |m| m.ad_group_operation = create_ad_group_operation(client, ad_group_resource_name, campaign_resource_name) end operations += create_asset_operations(client, video_asset_resource_name, video_id, logo_asset_resource_name).map do |asset_op| client.operation.mutate do |m| m.asset_operation = asset_op end end operations << client.operation.mutate do |m| m.ad_group_ad_operation = create_demand_gen_ad_operation(client, ad_group_resource_name, video_asset_resource_name, logo_asset_resource_name) end response = client.service.google_ads.mutate( customer_id: customer_id, mutate_operations: operations, )
Perl
This example is not yet available in Perl; you can take a look at the other languages.
curl
Để xem hướng dẫn từng bước về ngân sách, chiến lược đặt giá thầu và định dạng quảng cáo, hãy xem bài viết Tạo chiến dịch Tạo nhu cầu.
Truy vấn chiến dịch Tạo nhu cầu
Sử dụng GoogleAdsService.SearchStream để truy xuất các thuộc tính phân bổ cho chiến dịch Tạo nhu cầu và chỉ số hiệu suất được phân đoạn theo mạng và nền tảng YouTube (bạn phải chọn đồng thời segments.ad_network_type và segments.ad_sub_network_type):
SELECT
campaign.id,
campaign.name,
campaign.status,
campaign.bidding_strategy_type,
segments.ad_network_type,
segments.ad_sub_network_type,
metrics.impressions,
metrics.clicks,
metrics.conversions,
metrics.cost_micros
FROM campaign
WHERE campaign.advertising_channel_type = DEMAND_GEN
AND segments.date DURING LAST_30_DAYS
Đối với các truy vấn phân tích ở cấp quảng cáo, cấp thành phần và lượt chuyển đổi, hãy xem bài viết Báo cáo chiến dịch Tạo nhu cầu.
Các bước tiếp theo
- Tạo chiến dịch Tạo nhu cầu
- Thiết lập tiêu chí nhắm mục tiêu theo đối tượng
- Sử dụng nguồn cấp dữ liệu sản phẩm với chiến dịch Tạo nhu cầu
- Định cấu hình các chế độ kiểm soát kênh
- Lấy báo cáo của chiến dịch Tạo nhu cầu