キャンペーン内テストは、1 つのキャンペーン内で特定の機能をテストするために使用されます。トラフィックが対照群キャンペーンと介入群キャンペーンに分割されるシステム管理のテストとは異なり、キャンペーン内テストでは、機能が有効になっているかどうかに基づいて、キャンペーン内のトラフィックが分割されます。
このワークフローは、次の ExperimentType 値でサポートされています。
ADOPT_AI_MAX- 検索キャンペーンに対する AI 最大化設定機能の影響をテストします。
ADOPT_BROAD_MATCH_KEYWORDS- インテント マッチ キーワードが検索キャンペーンに与える影響をテストします。
PMAX_TEXT_CUSTOMIZATION_FINAL_URL_EXPANSION- 特に、P-MAX の機能(テキストのカスタマイズと最終ページ URL の拡張)のテストに使用されます。Google AI が関連性の高いランディング ページにトラフィックを送り、検索語句への適合性を高めたテキスト アセットを生成できるようになります。
セットアップ
Experiment(statusをENABLEDに設定)を定義し、テストタイプ、コントロールExperimentArm、介入群ExperimentArmを指定します。ADOPT_AI_MAXとADOPT_BROAD_MATCH_KEYWORDSの場合、対照群と介入群の両方でcampaignsの同じキャンペーンを参照する必要があります。PMAX_TEXT_CUSTOMIZATION_FINAL_URL_EXPANSIONの場合、介入群のみがcampaignsで P-MAX キャンペーンを指定します(対照群ではcampaignsを設定しないままにします)。
ADOPT_AI_MAXの場合は、フィールド マスクを使用してCampaignOperation更新を作成し、ai_max_setting.enable_ai_maxを有効にしてasset_automation_settingsを構成します。ミューテーション オペレーションを含む
GoogleAdsService.Mutateリクエストを送信して、テストとテスト群を作成し(ADOPT_AI_MAXの場合)、キャンペーンでテスト機能を有効にします。
ADOPT_AI_MAX と ADOPT_BROAD_MATCH_KEYWORDS の場合、トラフィックの 50% が有効な機能(介入群)に割り当てられ、残りの 50% が割り当てられない(対照群)ように、キャンペーン内でトラフィックを均等に(50/50)分割する必要があります。PMAX_TEXT_CUSTOMIZATION_FINAL_URL_EXPANSION は、合計が 100 になるカスタム トラフィック分割をサポートしています。
Java
// Create the experiment resource name using a temporary ID. String experimentResourceName = ResourceNames.experiment(customerId, -1L); // Create the experiment. Experiment experiment = Experiment.newBuilder() .setResourceName(experimentResourceName) .setName("ADOPT_AI_MAX Experiment #" + UUID.randomUUID()) .setType(ExperimentType.ADOPT_AI_MAX) .build(); MutateOperation experimentOperation = MutateOperation.newBuilder() .setExperimentOperation(ExperimentOperation.newBuilder().setCreate(experiment).build()) .build(); // Create the control arm. Both arms in an intra-campaign experiment reference the same base // campaign. ExperimentArm controlArm = ExperimentArm.newBuilder() .setExperiment(experimentResourceName) .setName("Control Arm") .setControl(true) .setTrafficSplit(50) .addCampaigns(ResourceNames.campaign(customerId, campaignId)) .build(); MutateOperation controlArmOperation = MutateOperation.newBuilder() .setExperimentArmOperation( ExperimentArmOperation.newBuilder().setCreate(controlArm).build()) .build(); // Create the treatment arm. ExperimentArm treatmentArm = ExperimentArm.newBuilder() .setExperiment(experimentResourceName) .setName("Treatment Arm") .setControl(false) .setTrafficSplit(50) .addCampaigns(ResourceNames.campaign(customerId, campaignId)) .build(); MutateOperation treatmentArmOperation = MutateOperation.newBuilder() .setExperimentArmOperation( ExperimentArmOperation.newBuilder().setCreate(treatmentArm).build()) .build(); // Create a campaign operation with an update mask to enable AI Max and configure asset // automation settings. // Note: For intra-campaign experiments, these settings are applied to the base campaign but are // only active for the treatment traffic split. Campaign campaign = Campaign.newBuilder() .setResourceName(ResourceNames.campaign(customerId, campaignId)) .setAiMaxSetting(AiMaxSetting.newBuilder().setEnableAiMax(true).build()) .addAssetAutomationSettings( AssetAutomationSetting.newBuilder() .setAssetAutomationType(AssetAutomationType.TEXT_ASSET_AUTOMATION) .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN) .build()) .addAssetAutomationSettings( AssetAutomationSetting.newBuilder() .setAssetAutomationType( AssetAutomationType.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION) .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN) .build()) .build(); CampaignOperation campaignOp = CampaignOperation.newBuilder() .setUpdate(campaign) .setUpdateMask(FieldMasks.allSetFieldsOf(campaign)) .build(); MutateOperation campaignMutateOperation = MutateOperation.newBuilder().setCampaignOperation(campaignOp).build(); // Send all mutate operations in a single Mutate request. List<MutateOperation> mutateOperations = ImmutableList.of( experimentOperation, controlArmOperation, treatmentArmOperation, campaignMutateOperation); try (GoogleAdsServiceClient googleAdsServiceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) { MutateGoogleAdsRequest request = MutateGoogleAdsRequest.newBuilder() .setCustomerId(Long.toString(customerId)) .addAllMutateOperations(mutateOperations) .build(); MutateGoogleAdsResponse response = googleAdsServiceClient.mutate(request);
C#
// Create the experiment resource name using a temporary ID. string experimentResourceName = ResourceNames.Experiment(customerId, -1); // Create the experiment. MutateOperation experimentOperation = new MutateOperation() { ExperimentOperation = new ExperimentOperation() { Create = new Experiment() { ResourceName = experimentResourceName, Name = $"ADOPT_AI_MAX Experiment #{ExampleUtilities.GetRandomString()}", Type = ExperimentType.AdoptAiMax } } }; // Create the control arm. Both arms in an intra-campaign experiment // reference the same base campaign. MutateOperation controlArmOperation = new MutateOperation() { ExperimentArmOperation = new ExperimentArmOperation() { Create = new ExperimentArm() { Experiment = experimentResourceName, Name = "Control Arm", Control = true, TrafficSplit = 50, Campaigns = { ResourceNames.Campaign(customerId, campaignId) } } } }; // Create the treatment arm. MutateOperation treatmentArmOperation = new MutateOperation() { ExperimentArmOperation = new ExperimentArmOperation() { Create = new ExperimentArm() { Experiment = experimentResourceName, Name = "Treatment Arm", Control = false, TrafficSplit = 50, Campaigns = { ResourceNames.Campaign(customerId, campaignId) } } } }; // Create a campaign operation with an update mask to enable AI Max and // configure asset automation settings. // Note: For intra-campaign experiments, these settings are applied to the // base campaign but are only active for the treatment traffic split. Campaign campaign = new Campaign() { ResourceName = ResourceNames.Campaign(customerId, campaignId), AiMaxSetting = new Campaign.Types.AiMaxSetting { EnableAiMax = true } }; campaign.AssetAutomationSettings.Add(new Campaign.Types.AssetAutomationSetting { AssetAutomationType = AssetAutomationType.TextAssetAutomation, AssetAutomationStatus = AssetAutomationStatus.OptedIn }); campaign.AssetAutomationSettings.Add(new Campaign.Types.AssetAutomationSetting { AssetAutomationType = AssetAutomationType.FinalUrlExpansionTextAssetAutomation, AssetAutomationStatus = AssetAutomationStatus.OptedIn }); MutateOperation campaignOperation = new MutateOperation() { CampaignOperation = new CampaignOperation() { Update = campaign, UpdateMask = FieldMasks.AllSetFieldsOf(campaign) } }; // Send all mutate operations in a single Mutate request. List<MutateOperation> mutateOperations = new List<MutateOperation> { experimentOperation, controlArmOperation, treatmentArmOperation, campaignOperation }; MutateGoogleAdsResponse response = googleAdsService.Mutate( customerId.ToString(), mutateOperations);
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 # 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. # Note: For intra-campaign experiments, these settings are applied to the # base campaign but are only active for the treatment traffic split. 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 クエリは、過去 30 日間の 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 segments.date DURING LAST_30_DAYS
AND experiment.type = 'ADOPT_AI_MAX'
テストを昇格、卒業、終了する
結果を評価したら、ExperimentService を使用してテストを完了できます。
- 終了: 結果に満足できない場合は、
EndExperimentを使用します。この機能は無効になり、キャンペーンはテスト機能なしですべてのトラフィックに配信されるようになります。これは同期オペレーションです。 - プロモート(
ADOPT_AI_MAXとADOPT_BROAD_MATCH_KEYWORDS): 検索キャンペーン内テストの結果に満足している場合は、PromoteExperimentを使用します。これにより、テストの変更がキャンペーンの新しい永続的な状態として適用されます。これは非同期オペレーションです。詳細については、非同期エラーをご覧ください。 - 卒業(
PMAX_TEXT_CUSTOMIZATION_FINAL_URL_EXPANSION):PMAX_TEXT_CUSTOMIZATION_FINAL_URL_EXPANSIONではPromoteExperimentはサポートされていません。代わりに、GraduateExperimentを使用して、既存の P-MAX キャンペーンにテスト群のテキストのカスタマイズと最終ページ URL の拡張機能の設定を適用します。campaign_budget_mappingsにCampaignBudgetMappingエントリを含め、介入群のキャンペーン(experiment_campaign)とその予算(campaign_budget)を指定します。これは同期オペレーションです。(ADOPT_AI_MAXまたはADOPT_BROAD_MATCH_KEYWORDSにはGraduateExperimentはサポートされていません。卒業する別のトリートメント キャンペーンがないためです)。