素材資源最佳化實驗

素材資源最佳化實驗會測試最高成效廣告活動中的不同素材資源組合,讓您比較不同素材資源組合與基準組合的成效。

ExperimentType.OPTIMIZE_ASSETS 支援這個工作流程。

設定

如要設定素材資源最佳化實驗,請按照下列步驟操作:

  • 建立新的素材資源,以及包含控制組和實驗組的實驗。
  • 在單一變更要求中,將新素材資源連結至實驗組的素材資源群組。

必要條件

建立素材資源最佳化實驗前,您必須有現有的最高成效廣告活動,以及做為兩個實驗組基準的基礎 AssetGroup 資源 (customers/{customer_id}/assetGroups/{asset_group_id})。如果是ADD_ASSETS_TO_ASSETLESS_RETAIL,請確認基礎AssetGroup已設定至少一個final_urls,再建立實驗 (進行中的素材資源實驗會凍結基礎AssetGroup的編輯功能,且必須有final_urls才能連結自訂素材資源)。

要求作業順序

由於這些實體相互依存,因此您必須使用暫時資源名稱,參照在同一要求中先前作業建立的資源。

要求中的作業必須按照下列順序執行:

  1. 建立一或多個 Asset 資源,並使用暫時資源名稱 (例如 customers/CUSTOMER_ID/assets/-1)。加入測試素材資源,以及任何新的 BUSINESS_NAME 和 LOGO 品牌資產 (如果無素材資源的零售廣告活動已啟用品牌宣傳指南,且沒有現有的品牌連結,請在步驟 1 後立即使用 CampaignAsset 作業,將這些品牌資產連結至基礎 Campaign)。
  2. 建立 Experiment,並使用暫時資源名稱 (例如 customers/CUSTOMER_ID/experiments/-2),將 type 設為 OPTIMIZE_ASSETS,status 設為 ENABLED,optimize_assets_experiment.optimize_assets_experiment_subtype 則設為所選 OptimizeAssetsExperimentSubtype (例如 COMPARE_ASSETS)。
  3. 建立兩個 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 (repeated AssetGroupAssetInfo) 列出實驗組的 Asset 資源和 field_type,包括步驟 1 中新建立的測試 Asset (customers/CUSTOMER_ID/assets/-1)。使用 ADD_ASSETS_TO_ASSETLESS_RETAIL 時,實驗組的 asset_group_assets 必須符合所有素材資源群組最低要求 (請勿單獨列出選用素材資源,例如 YOUTUBE_VIDEO),且如果基礎廣告活動已啟用品牌宣傳指南,則必須在同一個要求中提供或建立必要的廣告活動層級 BUSINESS_NAME 和 LOGO CampaignAsset 連結。
  4. 建立連續的 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。在這個過程中,與控制組相關聯的原始基礎廣告活動會暫停,實驗組則會轉換為新的獨立廣告活動。這項作業會同步執行。