การรายงานการทดสอบทำได้ 2 วิธีหลักๆ ดังนี้
- การรายงานการทดสอบโดยตรง: ส่งคำค้นหาทรัพยากร
experimentเพื่อดูเมตริก ตัวเลือกนี้จะแสดงเมตริกสำหรับกลุ่มควบคุมและกลุ่มทดสอบในการตอบกลับครั้งเดียว พร้อมกับข้อมูลการเปรียบเทียบทางสถิติ เช่น Lift และค่า P ซึ่งเป็นวิธีเดียวในการรายงานการทดสอบภายในแคมเปญ - การรายงานแคมเปญ: ส่งคำค้นหาทรัพยากร
campaignเพื่อดูเมตริก โดยใช้campaign.experiment_typeเพื่อแยกแยะระหว่างแคมเปญฐาน กับแคมเปญทดสอบ ตัวเลือกนี้ใช้ได้กับการทดสอบที่ใช้แคมเปญควบคุมและแคมเปญทดสอบแยกกันเท่านั้น เช่น การทดสอบที่ระบบจัดการ
คู่มือนี้จะเน้นที่การรายงานการทดสอบโดยตรงเป็นหลัก ซึ่งเข้ากันได้กับการทดสอบทุกประเภทที่รองรับการรายงาน
การรายงานการทดสอบโดยตรง
คุณสามารถส่งคำค้นหาทรัพยากร experiment โดยตรงเพื่อดึงข้อมูลเมตริกประสิทธิภาพและการเปรียบเทียบทางสถิติระหว่างกลุ่มควบคุมกับกลุ่มทดสอบ
เมตริกและความมีนัยสำคัญทางสถิติ
สําหรับเมตริกหลัก เช่น การคลิก การแสดงผล ต้นทุน Conversion และมูลค่า Conversion ทรัพยากร experiment จะแสดงทั้งเมตริกกลุ่มทดสอบ (เช่น metrics.clicks) และเมตริกกลุ่มควบคุม (เช่น metrics.control_clicks) ในแถวเดียวกัน
นอกจากนี้ยังมีช่องข้อมูลที่จะช่วยคุณประเมินความมีนัยสำคัญทางสถิติของความแตกต่างระหว่างกลุ่มต่างๆ ดังนี้
metrics.*_p_value: ความน่าจะเป็นที่ผลลัพธ์ที่สังเกตได้จะเกิดขึ้นหากการทดสอบไม่มีผลจริงต่อเมตริก ค่า P ที่ต่ำกว่าแสดงถึงความมีนัยสำคัญทางสถิติที่สูงกว่าmetrics.*_point_estimate: เปอร์เซ็นต์ Lift โดยประมาณ (เป็นบวกหรือลบ) ในเมตริกที่กำหนดสําหรับกลุ่มทดสอบเมื่อเทียบกับกลุ่มควบคุม เมื่อรวมกับmargin_of_errorแล้ว จะอธิบายช่วงความเชื่อมั่นที่มีระดับความเชื่อมั่นที่กำหนดไว้สำหรับความแตกต่างที่ประมาณไว้ ปริมาณที่ประมาณไว้คือ (กลุ่มทดสอบ / กลุ่มควบคุม - 1) ค่าประมาณจุดคือจุดกึ่งกลางของช่วงความเชื่อมั่นmetrics.*_margin_of_error: รัศมีของช่วงความเชื่อมั่น ซึ่งมีจุดกึ่งกลางอยู่ที่point_estimateโดยจะคำนวณสำหรับระดับความเชื่อมั่นที่กำหนดไว้ ซึ่งขึ้นอยู่กับประเภทการทดสอบ
ทรัพยากร experiment รองรับช่องข้อมูลเมตริกหลักต่อไปนี้ ซึ่งรวมถึงค่ากลุ่มทดสอบ ค่ากลุ่มควบคุม และช่องข้อมูลสถิติที่ระบุไว้ก่อนหน้านี้
clicksimpressionscost_microsconversionscost_per_conversionconversion_valueconversion_value_per_cost
สําหรับ Conversion โดยเฉพาะ ช่องข้อมูลทางสถิติจะใช้ได้ผ่านช่องข้อมูล absolute_change ต่อไปนี้ แทนที่จะเป็นค่าสัมพัทธ์
metrics.conversions_absolute_change_p_value: ค่า P สําหรับสมมติฐานว่างที่ว่าการทดสอบไม่มีผลต่อการเปลี่ยนแปลงสัมบูรณ์ของ Conversion มีค่าตั้งแต่ 0 ถึง 1metrics.conversions_absolute_change_point_estimate: ค่าประมาณจุดเมื่อประมาณผลของการทดสอบต่อการเปลี่ยนแปลงสัมบูรณ์ของ Conversionmetrics.conversions_absolute_change_margin_of_error: ความคลาดเคลื่อนเมื่อประมาณผลของการทดสอบต่อการเปลี่ยนแปลงสัมบูรณ์ของ Conversion
หากต้องการความช่วยเหลือในการสร้างคําค้นหาที่ถูกต้องสําหรับทรัพยากร experiment ให้ใช้
เครื่องมือสร้างคําค้นหา Google Ads
ตัวอย่างคำค้นหา
คําค้นหา 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 ต่ำกว่าเกณฑ์ที่เลือก (เช่น
0.05 สําหรับความเชื่อมั่น 95%) และ conversions_absolute_change_point_estimate -
conversions_absolute_change_margin_of_error มากกว่า 0 แสดงว่ากลุ่มทดสอบมีประสิทธิภาพดีกว่ากลุ่มควบคุมอย่างมาก
ในแง่ของ Conversion
ต่อไปนี้เป็นข้อมูลโค้ด Python ที่แสดงวิธีประเมินผลลัพธ์ตามค่า P และค่าประมาณ Lift
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
ข้อดีของการรายงานการทดสอบโดยตรงเมื่อเทียบกับการรายงานแคมเปญ
การรายงานการทดสอบโดยตรงมีข้อดีหลายประการเมื่อเทียบกับการส่งคําค้นหารายงานแคมเปญแยกกัน ดังนี้
- เมตริกแบบรวมศูนย์: ดึงข้อมูลเมตริกสําหรับกลุ่มควบคุมและกลุ่มทดสอบใน แถวเดียว
- ข้อมูลความเชื่อมั่นทางสถิติ: แสดงค่า P, ค่าประมาณจุด และค่าความคลาดเคลื่อนที่คํานวณแล้ว
- ประสิทธิภาพ: ไม่จําเป็นต้องรวมหรือเปรียบเทียบผลลัพธ์จาก รายงานหลายฉบับด้วยตนเอง
- การรองรับภายในแคมเปญ: เป็นวิธีเดียวในการเปรียบเทียบกลุ่มควบคุมกับ กลุ่มทดสอบสําหรับการทดสอบภายในแคมเปญ ซึ่งการเข้าชมจะแยกออกภายใน แคมเปญเดียว
การรายงานแคมเปญ
สําหรับการทดสอบที่สร้างแคมเปญทดสอบแยกกัน (เช่น
SEARCH_CUSTOM) คุณสามารถส่งคําค้นหาทรัพยากร campaign และใช้
campaign.experiment_type เพื่อระบุ BASE (ควบคุม) และ EXPERIMENT
(ทดสอบ) วิธีนี้มีประโยชน์หากคุณต้องการแบ่งกลุ่มเมตริกในระดับที่ละเอียดกว่า (เช่น ตามกลุ่มโฆษณาหรือคีย์เวิร์ด) หรือดูข้อมูลเมตาของแคมเปญที่ไม่มีในทรัพยากร experiment อย่างไรก็ตาม คุณจะต้องเปรียบเทียบประสิทธิภาพและคํานวณทางสถิติด้วยตนเอง
คุณไม่สามารถใช้การรายงานระดับแคมเปญเพื่อเปรียบเทียบกลุ่มต่างๆ สําหรับการทดสอบภายในแคมเปญได้ เนื่องจากระบบจะแยกการเข้าชมภายในแคมเปญเดียว
การส่งคําค้นหา campaign สําหรับการทดสอบภายในแคมเปญจะแสดงเฉพาะยอดรวมแบบรวม
แนวทางปฏิบัติแนะนำ
- เลือกระดับความเชื่อมั่นที่เหมาะสม: การตั้งค่าเกณฑ์ค่า P ที่ต่ำลง จะให้คําแนะนําที่เป็นแนวทางได้เร็วขึ้น โดยเฉพาะอย่างยิ่งกับงบประมาณหรือปริมาณ Conversion ที่ต่ำกว่า ความเชื่อมั่น 95% (ค่า P <= 0.05) ถือเป็นมาตรฐานทางวิชาการและอาจเหมาะสําหรับผลลัพธ์ที่แม่นยำมากขึ้นในช่วงเวลาที่ยาวนานขึ้น
- ทําการทดสอบนานพอ: ทําการทดสอบอย่างน้อย 4 สัปดาห์เพื่อ พิจารณาวงจรประสิทธิภาพรายสัปดาห์ ระยะเวลาก่อนที่จะเกิด Conversion และระยะเวลาการเรียนรู้
- ให้เวลาระบบเพิ่มประสิทธิภาพ: สำหรับแคมเปญที่ใช้การเสนอราคาอัตโนมัติหรือการทดสอบ ฟีเจอร์ใหม่ ให้ละเว้นข้อมูล 1-2 สัปดาห์แรกเพื่อให้โมเดลการเสนอราคา และระดับการเข้าชมปรับเทียบกับการแยกการเข้าชม
- ใช้การแยกแบบ 50/50: โดยทั่วไปแล้วการแยกการเข้าชมแบบ 50/50 เป็นวิธีที่เร็วที่สุดเพื่อให้ได้ ผลลัพธ์ที่มีนัยสำคัญทางสถิติ
- ตั้งเวลาล่วงหน้า: ตั้งวันที่เริ่มต้นการทดสอบล่วงหน้า 3-7 วันใน อนาคตเพื่อให้มีเวลาสําหรับกระบวนการตรวจสอบและอนุมัติโฆษณา
- คุณทําการทดสอบได้ครั้งละ 1 รายการเท่านั้นต่อแคมเปญ