キャンペーン内テストは、1 つのキャンペーン内の特定の機能をテストするために使用されます。 トラフィックが 対照群キャンペーンと介入群キャンペーンに分割されるシステム管理のテストとは異なり、キャンペーン内テストでは、機能が有効になっているかどうかに基づいて、キャンペーン内でトラフィックが 分割されます。
このワークフローは、次の
ExperimentType 値でサポートされています。
ADOPT_AI_MAXADOPT_BROAD_MATCH_KEYWORDS
設定
Experimentを定義し、テストの種類、対照群ExperimentArm、介入群ExperimentArmを指定します。各グループは同じキャンペーンを参照する必要があります。- フィールド マスクを使用して、テスト機能のテストを有効にします。
ADOPT_BROAD_MATCH_KEYWORDSの場合は不要 です。テストの作成時に、部分一致キャンペーンの設定が自動的に有効になります。 - テストとテストグループを作成し、テスト機能を有効にする(該当する場合)ための変更オペレーションを含む
GoogleAdsService.Mutateリクエストを送信します。
設定が完了すると、キャンペーン内でトラフィックが分割され、トラフィックの 50% が有効な機能(介入群)に、50% が有効でない機能(対照群)に配信されます。
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
# Create the experiment resource name using a temporary ID. experiment_resource_name = googleads_service.experiment_path( customer_id, "-1" ) # Create the experiment. experiment_operation = client.get_type("MutateOperation") experiment = experiment_operation.experiment_operation.create experiment.resource_name = experiment_resource_name experiment.name = f"ADOPT_AI_MAX Experiment #{uuid4()}" experiment.type_ = client.enums.ExperimentTypeEnum.ADOPT_AI_MAX experiment.status = client.enums.ExperimentStatusEnum.SETUP # Create the control arm. Both arms in an intra-campaign experiment # reference the same base campaign. control_arm_operation = client.get_type("MutateOperation") control_arm = control_arm_operation.experiment_arm_operation.create control_arm.experiment = experiment_resource_name control_arm.name = "Control Arm" control_arm.control = True control_arm.traffic_split = 50 control_arm.campaigns.append( googleads_service.campaign_path(customer_id, campaign_id) ) # Create the treatment arm. treatment_arm_operation = client.get_type("MutateOperation") treatment_arm = treatment_arm_operation.experiment_arm_operation.create treatment_arm.experiment = experiment_resource_name treatment_arm.name = "Treatment Arm" treatment_arm.control = False treatment_arm.traffic_split = 50 treatment_arm.campaigns.append( googleads_service.campaign_path(customer_id, campaign_id) ) # Create a campaign operation with an update mask to enable AI Max and # configure asset automation settings. campaign_operation = client.get_type("MutateOperation") campaign = campaign_operation.campaign_operation.update campaign.resource_name = googleads_service.campaign_path( customer_id, campaign_id ) campaign.ai_max_setting.enable_ai_max = True for asset_automation_type_enum in [ client.enums.AssetAutomationTypeEnum.TEXT_ASSET_AUTOMATION, client.enums.AssetAutomationTypeEnum.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION, ]: asset_automation_setting = client.get_type( "Campaign" ).AssetAutomationSetting() asset_automation_setting.asset_automation_type = ( asset_automation_type_enum ) asset_automation_setting.asset_automation_status = ( client.enums.AssetAutomationStatusEnum.OPTED_IN ) campaign.asset_automation_settings.append(asset_automation_setting) client.copy_from( campaign_operation.campaign_operation.update_mask, protobuf_helpers.field_mask(None, campaign._pb), ) # Send all mutate operations in a single Mutate request. mutate_operations = [ experiment_operation, control_arm_operation, treatment_arm_operation, campaign_operation, ] 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
テストのレポート
対照群と介入群のトラフィックは 1 つのキャンペーン内で混在しているため、対照群と介入群の指標を比較するには、直接的なテストレポートを使用する必要があります。標準のキャンペーン単位のレポートでは、キャンペーン全体の集計指標のみが表示され、2 つのグループを区別することはできません。
次の GAQL クエリを使用すると、ADOPT_AI_MAX キャンペーン内テストのクリック数を取得できます。
SELECT
experiment.resource_name,
experiment.name,
metrics.clicks,
metrics.control_clicks,
metrics.clicks_point_estimate,
metrics.clicks_p_value
FROM experiment
WHERE experiment.type = 'ADOPT_AI_MAX'
テストを昇格または終了する
結果を評価したら、テストを終了または昇格できます。
ExperimentService
- 終了: 結果に満足できない場合は、
EndExperimentを使用します。機能が無効になり、キャンペーンはテスト機能なしですべてのトラフィックに配信されるようになります。これは同期オペレーションです。 - 昇格: 結果に満足できる場合は、
PromoteExperimentを使用します。 これにより、テスト用の変更がキャンペーンの新しい永続的な状態として適用されます。これは非同期オペレーションです。詳しくは、非同期 エラーをご覧ください。
キャンペーン内テストでは、昇格する別の介入群キャンペーンがないため、昇格 オペレーションはサポートされていません。