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

Thử nghiệm tối ưu hoá thành phần được dùng để thử nghiệm các tổ hợp thành phần khác nhau trong chiến dịch Tối đa hoá hiệu suất, cho phép bạn so sánh hiệu suất của các nhóm thành phần khác nhau với một nhóm 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, một thử nghiệm có nhóm đối chứng và nhóm thử nghiệm.
  • Liên kết thành phần mới với nhóm thành phần của nhóm thử nghiệm – tất cả trong một yêu cầu biến đổi duy nhất.

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 Asset có tên tài nguyên tạm thời (chẳng hạn như customers/CUSTOMER_ID/assets/-1). Đây sẽ là thành phần thử nghiệm của bạn.
  2. Tạo một Experiment bằng tên tài nguyên tạm thời (ví dụ: customers/CUSTOMER_ID/experiments/-2).
  3. Tạo 2 tài nguyên ExperimentArm:
    • Một nhóm đối chứng được liên kết với một AssetGroup cơ sở.
    • Một nhóm can thiệp được liên kết với cùng một AssetGroup cơ sở. Trong nhóm này, hãy đặt trường asset_groups bằng tên tài nguyên tạm thời của tài sản được tạo ở bước 1.
  4. Tạo một AssetGroupAsset liên kết thành phần từ bước 1 với nhóm thành phần được dùng trong các nhánh 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 with Interplanetary Cruises!",
)
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
)
experiment.status = client.enums.ExperimentStatusEnum.SETUP

# 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,
    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

This example is not yet available in Ruby; you can take a look at the other languages.
    

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

Bạn có thể báo cáo về các thử nghiệm tối ưu hoá thành phần bằng cách sử dụng tài nguyên experiment để 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.

Chuyển dần lên hoặc kết thúc

Sau khi đánh giá kết quả, bạn có thể kết thúc hoặc chuyển đổi thử nghiệm bằng cách sử dụng biểu tượ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 biểu tượng EndExperiment. Đây là một thao tác đồng bộ.
  • Kết thúc: Nếu bạn thích hiệu suất của nhóm thành phần trong nhóm thử nghiệm, hãy sử dụng GraduateExperiment. Trong quá trình này, chiến dịch căn bản ban đầu được 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ộ.