Thử nghiệm tối ưu hoá thành phần sẽ thử nghiệm nhiều kiểu kết hợp thành phần trong chiến dịch Tối đa hoá hiệu suất, giúp bạn so sánh hiệu suất của nhiều nhóm thành phần với một nhóm thành phần cơ sở.
Quy trình này được hỗ trợ cho
ExperimentType.OPTIMIZE_ASSETS.
Thiết lập
Cách thiết lập thử nghiệm tối ưu hoá thành phần:
- Tạo một thành phần mới và một thử nghiệm có nhóm đối chứng và nhóm can thiệp.
- Liên kết thành phần mới với nhóm thành phần của nhóm can thiệp trong một yêu cầu thay đổi tài nguyên duy nhất.
Điều kiện tiên quyết
Trước khi tạo thử nghiệm tối ưu hoá thành phần, bạn phải có một chiến dịch Tối đa hoá hiệu suất hiện có và một tài nguyên AssetGroup cơ sở (customers/{customer_id}/assetGroups/{asset_group_id}) đóng vai trò là cơ sở cho cả hai nhóm thử nghiệm. Đối với ADD_ASSETS_TO_ASSETLESS_RETAIL, hãy đảm bảo
AssetGroup cơ sở đã có ít nhất một final_urls được đặt trước khi tạo
thử nghiệm (thử nghiệm thành phần đang hoạt động sẽ đóng băng các nội dung chỉnh sửa đối với AssetGroup
cơ sở và việc liên kết thành phần tuỳ chỉnh cần có final_urls).
Thứ tự thao tác yêu cầu
Vì các thực thể này phụ thuộc lẫn nhau, nên bạn phải sử dụng tên tài nguyên tạm thời để tham chiếu đến các tài nguyên được tạo trong các thao tác trước đó trong cùng một yêu cầu.
Các thao tác trong yêu cầu của bạn phải theo thứ tự sau:
- Tạo một hoặc nhiều tài nguyên
Assetcó tên tài nguyên tạm thời (chẳng hạn nhưcustomers/CUSTOMER_ID/assets/-1). Thêm thành phần thử nghiệm, cũng như mọi tài sản thương hiệuBUSINESS_NAMEvàLOGOmới nếu nguyên tắc trình bày thương hiệu được bật trên một chiến dịch bán lẻ không có thành phần và không có đường liên kết thương hiệu hiện có (trong trường hợp đó, hãy liên kết các tài sản thương hiệu đó vớiCampaigncơ sở bằng các thao tácCampaignAssetngay sau bước 1). - Tạo một
Experimentcó tên tài nguyên tạm thời (ví dụ:customers/CUSTOMER_ID/experiments/-2),typeđược đặt thànhOPTIMIZE_ASSETS,statusđược đặt thànhENABLEDvàoptimize_assets_experiment.optimize_assets_experiment_subtypeđược đặt thànhOptimizeAssetsExperimentSubtypeđã chọn (ví dụ:COMPARE_ASSETS). Tạo hai tài nguyên
ExperimentArmđược liên kết với tên tài nguyên thử nghiệm tạm thời ở bước 2, đặtcampaigns(thành tên tài nguyên chiến dịch Tối đa hoá hiệu suất),traffic_split(tổng là100) vàasset_groups(ExperimentArm.AssetGroupInfo) trên mỗi nhóm:- Một nhóm đối chứng (
control = true) trong đóasset_groupschứa mộtAssetGroupInfocóasset_groupđược đặt thành tên tài nguyên củaAssetGroupcơ sở (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID). Khi thử nghiệm các thành phần quảng cáo mới được thêm vào so với nhóm thành phần cơ sở (hoặc khi sử dụng các loại phụADD_ASSETS_TO_ASSETLESS_RETAILhoặcADD_VIDEO_ASSETS_TO_VIDEOLESS), hãy để trốngasset_group_assetstrên nhóm đối chứng; khi so sánh hai bộ thành phần riêng biệt trongCOMPARE_ASSETS, hãy liệt kê các mụcAssetGroupAssetInfocủa nhóm đối chứng (assetvàfield_type). - Một nhóm can thiệp (
control = false) trong đóasset_groupschứa mộtAssetGroupInfocóasset_groupđược đặt thành cùng một tên tài nguyênAssetGroupcơ sở (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID) vàasset_group_assets(repeatedAssetGroupAssetInfo) liệt kê các tài nguyênAssetvàfield_typecho nhóm can thiệp, bao gồm cảAsset(customers/CUSTOMER_ID/assets/-1) thử nghiệm mới tạo ở bước 1. Khi sử dụngADD_ASSETS_TO_ASSETLESS_RETAIL,asset_group_assetstrên nhóm can thiệp phải đáp ứng tất cả yêu cầu tối thiểu về nhóm thành phần (không chỉ liệt kê các thành phần không bắt buộc nhưYOUTUBE_VIDEO), đồng thời các đường liên kếtBUSINESS_NAMEvàLOGOCampaignAssetbắt buộc ở cấp chiến dịch phải có sẵn hoặc được tạo trong cùng một yêu cầu khi nguyên tắc trình bày thương hiệu được bật trên chiến dịch căn bản.
- Một nhóm đối chứng (
Tạo các tài nguyên
AssetGroupAssetliên tiếp liên kết các thành phần thử nghiệm từ bước 1 (customers/CUSTOMER_ID/assets/-1) vớiAssetGroupcơ sở được dùng trong các nhóm thử nghiệm.
Java
This example is not yet available in Java; you can take a look at the other languages.
C#
This example is not yet available in C#; you can take a look at the other languages.
PHP
This example is not yet available in PHP; you can take a look at the other languages.
Python
# 1. Create Assets with temporary resource names. # We create a text asset and an image asset to showcase different types. asset_operation_1 = create_text_asset_operation( client, customer_id, ASSET_1_TEMP_ID, "Fly to Mars!", ) asset_operation_2 = create_image_asset_operation( client, customer_id, ASSET_2_TEMP_ID, "https://gaagl.page.link/Eit5", "Mars Landscape View", ) # 2. Create an Experiment with a temporary resource name. experiment_operation = client.get_type("MutateOperation") experiment = experiment_operation.experiment_operation.create experiment.resource_name = googleads_service.experiment_path( customer_id, EXPERIMENT_TEMP_ID ) experiment.name = f"Interstellar Asset Experiment #{uuid4()}" experiment.type_ = client.enums.ExperimentTypeEnum.OPTIMIZE_ASSETS # Set the optimize assets experiment subtype to COMPARE_ASSETS. experiment.optimize_assets_experiment.optimize_assets_experiment_subtype = ( client.enums.OptimizeAssetsExperimentSubtypeEnum.COMPARE_ASSETS ) # 3. Create two ExperimentArm resources. treatment_assets = [ (ASSET_1_TEMP_ID, client.enums.AssetFieldTypeEnum.HEADLINE), (ASSET_2_TEMP_ID, client.enums.AssetFieldTypeEnum.MARKETING_IMAGE), ] arm_operations = create_arms_operations( client, customer_id, EXPERIMENT_TEMP_ID, campaign_resource_name, asset_group_id, treatment_assets, ) # 4. Create AssetGroupAssets linking the assets to the asset group. asset_group_asset_operation_1 = create_asset_group_asset_operation( client, customer_id, asset_group_id, ASSET_1_TEMP_ID, client.enums.AssetFieldTypeEnum.HEADLINE, ) asset_group_asset_operation_2 = create_asset_group_asset_operation( client, customer_id, asset_group_id, ASSET_2_TEMP_ID, client.enums.AssetFieldTypeEnum.MARKETING_IMAGE, ) # Send all operations in a single Mutate request. # The operations must be in this specific order. mutate_operations = [ asset_operation_1, asset_operation_2, experiment_operation, *arm_operations, asset_group_asset_operation_1, asset_group_asset_operation_2, ] response = googleads_service.mutate( customer_id=customer_id, mutate_operations=mutate_operations, )
Ruby
# 1. Create Assets with temporary resource names. # We create a text asset and an image asset to showcase different types. asset_operation_1 = create_text_asset_operation( client, customer_id, asset_1_temp_id, "Fly to Mars!", ) asset_operation_2 = create_image_asset_operation( client, customer_id, asset_2_temp_id, "https://gaagl.page.link/Eit5", "Mars Landscape View", ) # 2. Create an Experiment with a temporary resource name. experiment_operation = client.operation.mutate do |m| m.experiment_operation = client.operation.create_resource.experiment do |e| e.resource_name = client.path.experiment(customer_id, experiment_temp_id) e.name = "Interstellar Asset Experiment #{(Time.new.to_f * 1000).to_i}" e.type = :OPTIMIZE_ASSETS # Set the optimize assets experiment subtype to COMPARE_ASSETS. e.optimize_assets_experiment = client.resource.optimize_assets_experiment_info do |oae| oae.optimize_assets_experiment_subtype = :COMPARE_ASSETS end end end # 3. Create two ExperimentArm resources. treatment_assets = [ [asset_1_temp_id, :HEADLINE], [asset_2_temp_id, :MARKETING_IMAGE], ] arm_operations = create_arms_operations( client, customer_id, experiment_temp_id, campaign_resource_name, asset_group_id, treatment_assets, ) # 4. Create AssetGroupAssets linking the assets to the asset group. asset_group_asset_operation_1 = create_asset_group_asset_operation( client, customer_id, asset_group_id, asset_1_temp_id, :HEADLINE, ) asset_group_asset_operation_2 = create_asset_group_asset_operation( client, customer_id, asset_group_id, asset_2_temp_id, :MARKETING_IMAGE, ) # Send all operations in a single Mutate request. # The operations must be in this specific order. mutate_operations = [ asset_operation_1, asset_operation_2, experiment_operation, *arm_operations, asset_group_asset_operation_1, asset_group_asset_operation_2, ] response = client.service.google_ads.mutate( customer_id: customer_id, mutate_operations: mutate_operations, )
Perl
This example is not yet available in Perl; you can take a look at the other languages.
curl
Báo cáo về thử nghiệm
Hãy xem Hướng dẫn báo cáo để truy vấn tài nguyên experiment và so sánh các chỉ số giữa nhóm thành phần đối chứng và nhóm thành phần thử nghiệm.
Tốt nghiệp hoặc kết thúc
Sau khi đánh giá kết quả, bạn có thể kết thúc hoặc hoàn tất thử nghiệm bằng cách sử dụng ExperimentService.
- Kết thúc: Nếu bạn không hài lòng với kết quả của nhóm can thiệp, hãy sử dụng
EndExperiment. Đây là một thao tác đồng bộ. - Chuyển đổi: Nếu bạn muốn sử dụng nhóm thành phần của nhóm can thiệp, hãy dùng
GraduateExperiment. Trong quá trình này, chiến dịch căn bản ban đầu liên kết với nhóm đối chứng sẽ bị tạm dừng và nhóm can thiệp sẽ được chuyển đổi thành một chiến dịch mới, độc lập. Đây là một thao tác đồng bộ.