素材資源最佳化實驗會測試最高成效廣告活動中的不同素材資源組合,讓您比較不同素材資源組合與基準組合的成效。
ExperimentType.OPTIMIZE_ASSETS 支援這個工作流程。
設定
如要設定素材資源最佳化實驗,請按照下列步驟操作:
- 建立新的素材資源,以及包含控制組和實驗組的實驗。
- 在單一變更要求中,將新素材資源連結至實驗組的素材資源群組。
必要條件
建立素材資源最佳化實驗前,您必須有現有的最高成效廣告活動,以及做為兩個實驗組基準的基礎 AssetGroup 資源 (customers/{customer_id}/assetGroups/{asset_group_id})。如果是ADD_ASSETS_TO_ASSETLESS_RETAIL,請確認基礎AssetGroup已設定至少一個final_urls,再建立實驗 (進行中的素材資源實驗會凍結基礎AssetGroup的編輯功能,且必須有final_urls才能連結自訂素材資源)。
要求作業順序
由於這些實體相互依存,因此您必須使用暫時資源名稱,參照在同一要求中先前作業建立的資源。
要求中的作業必須按照下列順序執行:
- 建立一或多個
Asset資源,並使用暫時資源名稱 (例如customers/CUSTOMER_ID/assets/-1)。加入測試素材資源,以及任何新的BUSINESS_NAME和LOGO品牌資產 (如果無素材資源的零售廣告活動已啟用品牌宣傳指南,且沒有現有的品牌連結,請在步驟 1 後立即使用CampaignAsset作業,將這些品牌資產連結至基礎Campaign)。 - 建立
Experiment,並使用暫時資源名稱 (例如customers/CUSTOMER_ID/experiments/-2),將type設為OPTIMIZE_ASSETS,status設為ENABLED,optimize_assets_experiment.optimize_assets_experiment_subtype則設為所選OptimizeAssetsExperimentSubtype(例如COMPARE_ASSETS)。 建立兩個
ExperimentArm資源,並連結至步驟 2 的臨時實驗資源名稱,然後在每個實驗組設定campaigns(最高成效廣告活動資源名稱)、traffic_split(總和為100) 和asset_groups(ExperimentArm.AssetGroupInfo):- 控制組 (
control = true),其中asset_groups包含AssetGroupInfo,且asset_group設為基準AssetGroup的資源名稱 (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID)。如果測試新加入的廣告素材資源與基準素材資源群組的成效 (或使用ADD_ASSETS_TO_ASSETLESS_RETAIL或ADD_VIDEO_ASSETS_TO_VIDEOLESS子類型),請勿在控制組設定asset_group_assets;如要比較COMPARE_ASSETS下兩個不同的素材資源組合,請列出控制組的AssetGroupAssetInfo項目 (asset和field_type)。 - 實驗組 (
control = false),其中asset_groups包含AssetGroupInfo,且asset_group設為相同的基本AssetGroup資源名稱 (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID),以及asset_group_assets(repeatedAssetGroupAssetInfo) 列出實驗組的Asset資源和field_type,包括步驟 1 中新建立的測試Asset(customers/CUSTOMER_ID/assets/-1)。使用ADD_ASSETS_TO_ASSETLESS_RETAIL時,實驗組的asset_group_assets必須符合所有素材資源群組最低要求 (請勿單獨列出選用素材資源,例如YOUTUBE_VIDEO),且如果基礎廣告活動已啟用品牌宣傳指南,則必須在同一個要求中提供或建立必要的廣告活動層級BUSINESS_NAME和LOGOCampaignAsset連結。
- 控制組 (
建立連續的
AssetGroupAsset資源,將步驟 1 的測試素材資源 (customers/CUSTOMER_ID/assets/-1) 連結至實驗組中使用的基本AssetGroup。
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, )
小茹
# 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
實驗報表
請參閱報表指南,瞭解如何查詢 experiment 資源,以及比較控制組和實驗組素材資源群組的指標。
完成或結束
評估結果後,您可以使用 ExperimentService 結束或升級實驗。
- 結束:如果您對實驗組的結果不滿意,請使用
EndExperiment。這項作業會同步執行。 - 升級:如果實驗組素材資源群組的成效較佳,請使用
GraduateExperiment。在這個過程中,與控制組相關聯的原始基礎廣告活動會暫停,實驗組則會轉換為新的獨立廣告活動。這項作業會同步執行。