テストのレポートを作成するには、主に次の 2 つの方法があります。
- テストの直接レポート:
experimentリソースに指標をクエリします。このオプションでは、対象群と介入群の指標が 1 つのレスポンスで返されます。また、伸び率や p 値などの統計的な比較データも返されます。これは、キャンペーン内のテストをレポートする唯一の方法です。 - キャンペーン レポート:
campaignリソースに指標をクエリし、campaign.experiment_typeを使用してベース キャンペーンとテスト キャンペーンを区別します。このオプションは、システム管理テストなど、対照群キャンペーンと介入群キャンペーンを別々に使用するテストでのみ使用できます。
このガイドでは、主に直接テストレポートについて説明します。これは、レポートをサポートするすべてのテストタイプと互換性があります。
テスト結果レポートを直接確認する
experiment リソースを直接クエリして、対照群と介入群のパフォーマンス指標と統計的比較を取得できます。
指標と統計的有意性
クリック数、インプレッション数、費用、コンバージョン数、コンバージョン値などのコア指標の場合、experiment リソースは、同じ行にトリートメント指標(metrics.clicks など)とコントロール指標(metrics.control_clicks など)の両方を提供します。
また、テスト群間の差異の統計的有意性を評価するのに役立つフィールドも用意されています。
metrics.*_p_value: テストが指標に実際の影響を与えなかった場合に、観測された結果が発生する確率。p 値が小さいほど、統計的有意性が高いことを示します。metrics.*_point_estimate: 対照群と比較した実験群の、指定された指標の推定リフト率(正または負)。margin_of_errorとともに、推定される差の所定の信頼度を持つ信頼区間を表します。推定される量は(実験群 / 対照群 - 1)です。点推定は信頼区間の中央値です。metrics.*_margin_of_error: 信頼区間の半径。point_estimateを中心に計算されます。実験の種類に応じて、所定の信頼度で計算されます。
experiment リソースでは、次のコア指標フィールドがサポートされています。これには、トリートメント グループの値、コントロール グループの値、前述の統計フィールドが含まれます。
clicksimpressionscost_microsconversionscost_per_conversionconversion_valueconversion_value_per_cost
コンバージョンについては、統計フィールドは相対値ではなく、次の absolute_change フィールドで取得できます。
metrics.conversions_absolute_change_p_value: テストがコンバージョンの絶対変化に影響を与えないという帰無仮説の p 値。範囲は 0 ~ 1 です。metrics.conversions_absolute_change_point_estimate: コンバージョンに対するテストの効果の絶対変化を推定する際の点推定値。metrics.conversions_absolute_change_margin_of_error: コンバージョンの絶対変化に対するテストの効果を推定する際の誤差の範囲。
experiment リソースに対する有効なクエリの作成については、Google 広告クエリビルダー ツールをご利用ください。
クエリ例
次の GAQL クエリは、テストの主要な指標を取得します。
SELECT
experiment.experiment_id,
experiment.name,
experiment.type,
metrics.clicks,
metrics.control_clicks,
metrics.clicks_point_estimate,
metrics.clicks_margin_of_error,
metrics.clicks_p_value,
metrics.conversions,
metrics.control_conversions,
metrics.conversions_absolute_change_point_estimate,
metrics.conversions_absolute_change_margin_of_error,
metrics.conversions_absolute_change_p_value
FROM experiment
WHERE experiment.experiment_id = EXPERIMENT_ID
結果の解釈
p 値、点推定値、誤差の範囲の各フィールドを使用して、テストで統計的に有意な結果が得られたかどうかを判断できます。たとえば、conversions_absolute_change_p_value が選択したしきい値(95% の信頼度の場合 0.05 など)を下回り、conversions_absolute_change_point_estimate - conversions_absolute_change_margin_of_error がゼロより大きい場合、介入群のコンバージョン数が対照群よりも有意に多いことを示します。
p 値とリフトの見積もりに基づいて結果を評価する方法を示す Python スニペットを次に示します。
Java
private void evaluateExperiment( GoogleAdsClient googleAdsClient, long customerId, GoogleAdsRow row) { Metrics metrics = row.getMetrics(); String experimentResourceName = row.getExperiment().getResourceName(); // 1. Evaluate conversion success as a primary success signal if available. // - Point Estimate: Represents the estimated average lift or difference in conversions. // - Margin of Error: Outlines the confidence interval bounds. Note that the margin_of_error // provided by the API is calculated for a preset confidence level which is set based on the // experiment type. // - Lower Bound: (Point Estimate - Margin of Error). If this value is above 0, // we have statistical significance that performance has improved. double convPValue = metrics.getConversionsAbsoluteChangePValue(); double convLift = metrics.getConversionsAbsoluteChangePointEstimate(); double convError = metrics.getConversionsAbsoluteChangeMarginOfError(); double convLowerBound = convLift - convError; if (convPValue <= P_VALUE_THRESHOLD) { if (convLowerBound > 0) { System.out.printf( "Significant Success: Conversions increased. Even at the lower bound, the lift is %.2f." + " Promoting changes.%n", convLowerBound); promoteExperiment(googleAdsClient, customerId, experimentResourceName); return; } else if ((convLift + convError) < 0) { System.out.printf( "Significant Decline: Even the upper bound (%.2f) is below zero. Ending experiment.%n", convLift + convError); endExperiment(googleAdsClient, customerId, experimentResourceName); return; } } // 2. Fall back to evaluating click metrics if conversions are inconclusive. double clickPValue = metrics.getClicksPValue(); double clickLift = metrics.getClicksPointEstimate(); double clickError = metrics.getClicksMarginOfError(); double clickLowerBound = clickLift - clickError; if (clickPValue <= P_VALUE_THRESHOLD && clickLowerBound > 0) { System.out.printf("Click volume is significantly up (+%.1f%%).%n", clickLift * 100); // Graduation is only supported for separate campaign experiments, not // intra-campaign experiments where there is no separate treatment campaign. ExperimentType experimentType = row.getExperiment().getType(); if (experimentType != ExperimentType.ADOPT_BROAD_MATCH_KEYWORDS && experimentType != ExperimentType.ADOPT_AI_MAX) { System.out.println("Graduating treatment campaign for further manual analysis."); graduateExperiment(googleAdsClient, customerId, experimentResourceName); } else { System.out.println( "Intra-campaign trial detected: graduation is not supported. Continuing to run the" + " experiment to gather more conversion data."); } } else { // 3. Print status if no action was taken. System.out.printf( "Inconclusive: No significant lift in Conversions (p=%.2f) or Clicks (p=%.2f). Current" + " estimated lift: %.2f +/- %.2f. Allowing the experiment to continue running.%n", convPValue, clickPValue, convLift, convError); } }
C#
private static void EvaluateExperiment(GoogleAdsClient client, long customerId, GoogleAdsRow row) { // This function evaluates performance metrics and immediately takes action // to update the experiment's status (promote, end, or graduate) if // statistical significance thresholds are met. var metrics = row.Metrics; string experimentResourceName = row.Experiment.ResourceName; bool hasConvMetrics = metrics.HasConversionsAbsoluteChangePValue && metrics.HasConversionsAbsoluteChangePointEstimate && metrics.HasConversionsAbsoluteChangeMarginOfError; bool hasClickMetrics = metrics.HasClicksPValue && metrics.HasClicksPointEstimate && metrics.HasClicksMarginOfError; // 1. Evaluate conversion success as a primary success signal if available. // - Point Estimate: Represents the estimated average lift or difference in conversions. // - Margin of Error: Outlines the confidence interval bounds. Note that the margin_of_error // provided by the API is calculated for a preset confidence level which is set based on // the experiment type. // - Lower Bound: (Point Estimate - Margin of Error). If this value is above 0, // we have statistical significance that performance has improved. if (hasConvMetrics) { double convPValue = metrics.ConversionsAbsoluteChangePValue; double convLift = metrics.ConversionsAbsoluteChangePointEstimate; double convError = metrics.ConversionsAbsoluteChangeMarginOfError; double convLowerBound = convLift - convError; if (convPValue <= P_VALUE_THRESHOLD) { if (convLowerBound > 0) { Console.WriteLine( $"Significant Success: Conversions increased. Even at the lower" + $" bound, the lift is {convLowerBound:F2}. Promoting changes."); PromoteExperiment(client, customerId, experimentResourceName); return; } else if ((convLift + convError) < 0) { Console.WriteLine( $"Significant Decline: Even the upper bound ({convLift + convError:F2}) " + $"is below zero. Ending experiment."); EndExperiment(client, customerId, experimentResourceName); return; } } } // 2. Evaluate click volume as a secondary signal. // This is helpful as an early indicator or for lower-volume accounts. if (hasClickMetrics) { double clickPValue = metrics.ClicksPValue; double clickLift = metrics.ClicksPointEstimate; double clickError = metrics.ClicksMarginOfError; double clickLowerBound = clickLift - clickError; if (clickPValue <= P_VALUE_THRESHOLD && clickLowerBound > 0) { // We have a directional winner: high confidence in more traffic, // but not enough data to confirm conversion impact yet. Console.WriteLine( $"Click volume is significantly up (+{clickLift * 100:F1}%)."); // Graduation is only supported for separate campaign experiments, not // intra-campaign experiments where there is no separate treatment campaign. if (row.Experiment.Type != ExperimentType.AdoptBroadMatchKeywords && row.Experiment.Type != ExperimentType.AdoptAiMax) { Console.WriteLine("Graduating treatment campaign for further manual analysis."); GraduateExperiment(client, customerId, experimentResourceName); } else { Console.WriteLine( "Intra-campaign trial detected: graduation is not supported. " + "Continuing to run the experiment to gather more conversion data."); } return; } } // 3. Print status if no action was taken. if (hasConvMetrics || hasClickMetrics) { string convStatus = hasConvMetrics ? $"Conversions (p={metrics.ConversionsAbsoluteChangePValue:F2}, " + $"lift={metrics.ConversionsAbsoluteChangePointEstimate:F2} +/- " + $"{metrics.ConversionsAbsoluteChangeMarginOfError:F2})" : "Conversions (not populated)"; string clickStatus = hasClickMetrics ? $"Clicks (p={metrics.ClicksPValue:F2}, " + $"lift={metrics.ClicksPointEstimate:F2} +/- " + $"{metrics.ClicksMarginOfError:F2})" : "Clicks (not populated)"; Console.WriteLine( $"Inconclusive: No significant action taken. {convStatus}, {clickStatus}. " + "Allowing the experiment to continue running."); } else { Console.WriteLine( "Conversion and click performance metrics are not yet populated. " + "Allowing the experiment to continue running."); } }
PHP
This example is not yet available in PHP; you can take a look at the other languages.
Python
def evaluate_experiment( client: GoogleAdsClient, customer_id: str, row: GoogleAdsRow ) -> None: """Evaluates the performance of the experiment and updates it accordingly (for example, promotes, ends, or graduates). Checks conversion and click metrics against statistical significance thresholds to determine the appropriate action to take on the experiment. Args: client: an initialized GoogleAdsClient instance. customer_id: a client customer ID. row: a GoogleAdsRow containing the experiment and metrics. """ # This function evaluates performance metrics and immediately takes action # to update the experiment's status (promote, end, or graduate) if # statistical significance thresholds are met. metrics = row.metrics experiment_resource_name = row.experiment.resource_name has_conv_metrics = ( "conversions_absolute_change_p_value" in metrics and "conversions_absolute_change_point_estimate" in metrics and "conversions_absolute_change_margin_of_error" in metrics ) has_click_metrics = ( "clicks_p_value" in metrics and "clicks_point_estimate" in metrics and "clicks_margin_of_error" in metrics ) # 1. Evaluate conversion success as a primary success signal if available. # - Point Estimate: Represents the estimated average lift or difference in conversions. # - Margin of Error: Outlines the confidence interval bounds. Note that the margin_of_error provided by the API is calculated for a preset confidence level which is set based on the experiment type. # - Lower Bound: (Point Estimate - Margin of Error). If this value is above 0, # we have statistical significance that performance has improved. if has_conv_metrics: conv_p_value = metrics.conversions_absolute_change_p_value conv_lift = metrics.conversions_absolute_change_point_estimate conv_error = metrics.conversions_absolute_change_margin_of_error conv_lower_bound = conv_lift - conv_error if conv_p_value <= P_VALUE_THRESHOLD: if conv_lower_bound > 0: print( "Significant Success: Conversions increased. Even at the lower" f" bound, the lift is {conv_lower_bound:.2f}. Promoting" " changes." ) promote_experiment( client, customer_id, experiment_resource_name ) return elif (conv_lift + conv_error) < 0: print( "Significant Decline: Even the upper bound" f" ({conv_lift + conv_error:.2f}) is below zero. Ending" " experiment." ) end_experiment(client, customer_id, experiment_resource_name) return # 2. Evaluate click volume as a secondary signal. # This is helpful as an early indicator or for lower-volume accounts. click_p_value = metrics.clicks_p_value click_lift = metrics.clicks_point_estimate click_error = metrics.clicks_margin_of_error click_lower_bound = click_lift - click_error if click_p_value <= P_VALUE_THRESHOLD and click_lower_bound > 0: # We have a directional winner: high confidence in more traffic, # but not enough data to confirm conversion impact yet. print(f"Click volume is significantly up (+{click_lift*100:.1f}%).") # Graduation is only supported for separate campaign experiments, not # intra-campaign experiments where there is no separate treatment campaign. experiment_type_name = row.experiment.type_.name if ( experiment_type_name != "ADOPT_BROAD_MATCH_KEYWORDS" and experiment_type_name != "ADOPT_AI_MAX" ): print( "Graduating treatment campaign for further manual analysis." ) graduate_experiment( client, customer_id, experiment_resource_name ) else: print( "Intra-campaign trial detected: graduation is not supported. " "Continuing to run the experiment to gather more conversion data." ) return # 3. Print status if no action was taken. if has_conv_metrics or has_click_metrics: conv_status = ( f"Conversions (p={metrics.conversions_absolute_change_p_value:.2f}, " f"lift={metrics.conversions_absolute_change_point_estimate:.2f} +/- " f"{metrics.conversions_absolute_change_margin_of_error:.2f})" if has_conv_metrics else "Conversions (not populated)" ) click_status = ( f"Clicks (p={metrics.clicks_p_value:.2f}, " f"lift={metrics.clicks_point_estimate:.2f} +/- " f"{metrics.clicks_margin_of_error:.2f})" if has_click_metrics else "Clicks (not populated)" ) print( f"Inconclusive: No significant action taken. {conv_status}, {click_status}." " Allowing the experiment to continue running." ) else: print( "Conversion and click performance metrics are not yet populated. " "Allowing the experiment to continue running." )
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 つの行でコントロールとトリートメントの指標を取得します。
- 統計的信頼性データ: 計算された p 値、点推定値、誤差の範囲を提供します。
- 効率性: 複数のレポートの結果を手動で結合したり比較したりする必要がなくなります。
- キャンペーン内でのサポート: トラフィックが 1 つのキャンペーン内で分割されるキャンペーン内テストで、対照群と介入群を比較する唯一の方法です。
キャンペーン レポート
別の介入群キャンペーンを作成するテスト(SEARCH_CUSTOM など)では、campaign リソースをクエリし、campaign.experiment_type を使用して BASE(対照群)キャンペーンと EXPERIMENT(介入群)キャンペーンを特定できます。この方法は、指標をより詳細なレベル(広告グループやキーワードなど)で分割する必要がある場合や、experiment リソースで利用できないキャンペーン メタデータを表示する場合に便利です。ただし、パフォーマンスの比較と統計計算を手動で行う必要があります。
キャンペーン単位のレポートでは、キャンペーン内のテスト群を比較できません。トラフィック分割は 1 つのキャンペーン内で内部的に行われるためです。キャンペーン内のテストで campaign をクエリすると、集計された合計のみが返されます。
ベスト プラクティス
- 適切な信頼水準を選択する: p 値のしきい値を低く設定すると、特に予算やコンバージョン数が少ない場合に、方向性に関するガイダンスをより早く得ることができます。95% の信頼度(p 値 <= 0.05)は学術的な標準と見なされ、より長い対象の期間にわたってより正確な精度を得るのに適している可能性があります。
- テストを十分に長い期間実施する: 少なくとも 4 週間はテストを実施して、週ごとのパフォーマンス サイクル、コンバージョン達成までの所要時間、学習期間を考慮します。
- 立ち上げ期間を設ける: 自動入札を使用しているキャンペーンや新機能をテストしているキャンペーンの場合は、入札モデルとトラフィック レベルが分割に合わせて再調整されるまでの期間を設けるため、最初の 1 ~ 2 週間のデータは無視します。
- 50/50 のトラフィック分割を使用する: 通常、統計的に有意な結果を最も早く得られるのは、トラフィックを 50/50 に分割する方法です。
- 事前にスケジュールを設定する: 広告の審査と承認のプロセスに時間を要するため、テストの開始日を 3 ~ 7 日後に設定します。
- 一度に実施できるテストは、キャンペーンごとに 1 つのみです。