Thử nghiệm tối ưu hoá thành phần

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:

  1. Tạo một hoặc nhiều tài nguyên Asset có 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ệu BUSINESS_NAME và LOGO mớ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ới Campaign cơ sở bằng các thao tác CampaignAsset ngay sau bước 1).
  2. Tạo một Experiment có tên tài nguyên tạm thời (ví dụ: customers/CUSTOMER_ID/experiments/-2), type được đặt thành OPTIMIZE_ASSETS, status được đặt thành ENABLED và optimize_assets_experiment.optimize_assets_experiment_subtype được đặt thành OptimizeAssetsExperimentSubtype đã chọn (ví dụ: COMPARE_ASSETS).
  3. 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, đặt campaigns (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_groups chứa một AssetGroupInfo có asset_group được đặt thành tên tài nguyên của AssetGroup cơ 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_RETAIL hoặc ADD_VIDEO_ASSETS_TO_VIDEOLESS ), hãy để trống asset_group_assets trên nhóm đối chứng; khi so sánh hai bộ thành phần riêng biệt trong COMPARE_ASSETS, hãy liệt kê các mục AssetGroupAssetInfo của nhóm đối chứng (asset và field_type).
    • Một nhóm can thiệp (control = false) trong đó asset_groups chứa một AssetGroupInfo có asset_group được đặt thành cùng một tên tài nguyên AssetGroup cơ sở (customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID) và asset_group_assets (repeated AssetGroupAssetInfo) liệt kê các tài nguyên Asset và field_type cho 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ụng ADD_ASSETS_TO_ASSETLESS_RETAIL, asset_group_assets trê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ết BUSINESS_NAME và LOGO CampaignAsset bắ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.
  4. Tạo các tài nguyên AssetGroupAsset liê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ới AssetGroup cơ 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ộ.