アセットの最適化テスト

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

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

セットアップ

アセット最適化テストを設定するには:

  • 新しいアセットを作成し、対照群と介入群を使用してテストを実施します。
  • 1 つの変更リクエスト内で、新しいアセットを介入群のアセット グループにリンクします。

前提条件

アセット最適化テストを作成する前に、既存の P-MAX キャンペーンと、両方の実験群のベースラインとして機能するベース AssetGroup リソース(customers/{customer_id}/assetGroups/{asset_group_id})が必要です。

リクエスト オペレーションの順序

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

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

  1. 一時的なリソース名(customers/CUSTOMER_ID/assets/-1 など)を使用して 1 つ以上の Asset リソースを作成します。これらはテストアセットです。
  2. Experiment を作成します。このとき、一時的なリソース名(例: customers/CUSTOMER_ID/experiments/-2)、OPTIMIZE_ASSETS に設定された type、ENABLED に設定された status、選択した OptimizeAssetsExperimentSubtype(例: COMPARE_ASSETS)に設定された optimize_assets_experiment.optimize_assets_experiment_subtype を使用します。
  3. ステップ 2 の一時的なテストリソース名にリンクされた 2 つの ExperimentArm リソースを作成し、各アームに campaigns(P-MAX キャンペーン リソース名)、traffic_split(合計 100)、asset_groups(ExperimentArm.AssetGroupInfo)を設定します。

    • コントロール アーム(control = true)。asset_groups には、asset_group がベース AssetGroup(customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID)のリソース名に設定された AssetGroupInfo が含まれます。新しく追加されたアセットをベースライン アセット グループに対してテストする場合(または ADD_ASSETS_TO_ASSETLESS_RETAIL または ADD_VIDEO_ASSETS_TO_VIDEOLESS サブタイプを使用する場合)、コントロール アームで asset_group_assets を設定しないままにします。COMPARE_ASSETS で 2 つの異なるアセットセットを比較する場合は、コントロール アームの AssetGroupAssetInfo エントリ(asset と field_type)を一覧表示します。
    • 介入群(control = false)。asset_groups には、asset_group が同じベース AssetGroup リソース名(customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID)に設定された AssetGroupInfo と、介入群の Asset リソースと field_type をリストする asset_group_assets(repeated AssetGroupAssetInfo)が含まれます。これには、ステップ 1 で新しく作成されたテスト Asset(customers/CUSTOMER_ID/assets/-1)が含まれます。
  4. ステップ 1 のテストアセット(customers/CUSTOMER_ID/assets/-1)を、実験群で使用されるベース AssetGroup にリンクする 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!",
)
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

テスト結果をレポートする

レポートガイドを参照して experiment リソースをクエリし、対照群と介入群のアセット グループ間で指標を比較します。

卒業または終了

結果を評価した後、ExperimentService を使用してテストを終了するか、テストを完了できます。

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