アセット最適化テスト

アセットの最適化テストは、P-MAX キャンペーン内のさまざまなアセットの組み合わせをテストするために使用されます。これにより、さまざまなアセットセットのパフォーマンスをベースセットと比較できます。

このワークフローは ExperimentType.OPTIMIZE_ASSETSでサポートされています。

設定

アセットの最適化テストを設定する手順は次のとおりです。

  • 新しいアセットを作成し、対照群と介入群を含むテストを作成します。
  • 新しいアセットを介入群のアセット グループにリンクします。これらはすべて 1 つの mutate リクエスト内で行います。

これらのエンティティは相互に依存しているため、同じリクエスト内の以前のオペレーションで作成されたリソースを参照するには、一時的なリソース 名を使用する必要があります。

リクエスト内のオペレーションは次の順序で行う必要があります。

  1. 一時的なリソース名 (customers/CUSTOMER_ID/assets/-1 など)を使用して Asset を作成します。これがテスト アセットになります。
  2. 一時的なリソース 名(customers/CUSTOMER_ID/experiments/-2 など)を使用して Experiment を作成します。
  3. 2 つの ExperimentArm リソースを作成します:
    • ベースの AssetGroup にリンクされた対照群。
    • 同じベースの AssetGroup にリンクされた介入群。この群で、ステップ 1 で作成したアセットの一時的なリソース名を使用して asset_groups フィールドを設定します。
  4. ステップ 1 のアセットをテスト群で使用されるアセット グループにリンクする AssetGroupAsset を作成します。

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

テストのレポート

report リソースを使用してアセットの最適化テストのレポートを作成し、対照群と介入群のアセット グループの指標を比較できます。experiment

終了または卒業

結果を評価したら、テストを終了または卒業できます。 ExperimentService

  • 終了: 介入群の結果に満足できない場合は、 EndExperiment を使用します。これは同期オペレーションです。
  • 移行する: 介入群のアセット グループのパフォーマンスが優れている場合は、 GraduateExperimentを使用します。このプロセスの一環として、対照群に関連付けられている元の基本のキャンペーンは一時停止され、介入群は新しい独立したキャンペーンに変換されます。これは同期オペレーションです。