テストのレポート

テストのレポートを作成するには、主に次の 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 リソースでは、次のコア指標フィールドがサポートされています。これには、介入群の値、対照群の値、前述の統計フィールドが含まれます。

  • clicks
  • impressions
  • cost_micros
  • conversions
  • cost_per_conversion
  • conversion_value
  • conversion_value_per_cost

コンバージョンについては、統計フィールドは相対値ではなく、次の absolute_change フィールドで利用できます。

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

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

def evaluate_experiment(
    client: GoogleAdsClient, customer_id: str, row: GoogleAdsRow
) -> None:
    """Evaluates the performance of the treatment experiment arm.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.
        row: a GoogleAdsRow containing the experiment arm and metrics.
    """
    metrics = row.metrics
    experiment_resource_name = row.experiment.resource_name

    # 1. Evaluate conversion success as a primary success signal.
    # - 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.
    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}%). "
            "Graduating treatment for further manual analysis."
        )

        # Graduate if it's a separate campaign test.
        # This keeps the high-volume treatment running independently.
        # Intra-campaign experiments (like ADOPT_BROAD_MATCH_KEYWORDS and
        # ADOPT_AI_MAX) run directly within the base campaign, meaning there is only
        # a single campaign involved and no separate treatment campaign to graduate.
        # Therefore, graduation is not supported for intra-campaign experiments.
        experiment_type_name = row.experiment.type_.name
        if (
            experiment_type_name != "ADOPT_BROAD_MATCH_KEYWORDS"
            and experiment_type_name != "ADOPT_AI_MAX"
        ):
            graduate_experiment(client, customer_id, experiment_resource_name)
        else:
            print(
                "Intra-campaign trial detected: Graduation is not supported"
                " because there is only one campaign. Continuing to run to"
                " gather more conversion data."
            )
    else:
        # Both conversions and clicks are noisy.
        print(
            "Inconclusive: No significant lift in Conversions"
            f" (p={conv_p_value:.2f}) or Clicks (p={click_p_value:.2f})."
            f" Current estimated lift: {conv_lift:.2f} +/- {conv_error:.2f}."
            " 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. 一元化された指標: 対象群と介入群の指標を 1 つの行で取得します。
  2. 統計的信頼性データ: 計算された p 値、点推定値、誤差の範囲を提供します。
  3. 効率性: 複数のレポートの結果を手動で結合したり比較したりする必要がなくなります。
  4. キャンペーン内サポート: トラフィックが 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 つのみです。