יש שתי דרכים עיקריות לדווח על ניסויים:
- דיווח ישיר על ניסויים: אפשר לשלוח שאילתה למשאב
experimentכדי לקבל מדדים. האפשרות הזו מספקת מדדים לקבוצת הבקרה ולקבוצת הניסוי בתגובה אחת, יחד עם נתוני השוואה סטטיסטיים כמו עלייה בביצועים וערכי 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 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 גדול מאפס, זה מצביע על כך שקבוצת הניסוי מניבה ביצועים טובים משמעותית מקבוצת הבקרה מבחינת המרות.
הנה קטע קוד ב-Python שמדגים איך להעריך את התוצאות על סמך ערך p ואומדני התחזקות המותג:
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 יכולה לספק הנחיות מהירות יותר, במיוחד בתקציבים נמוכים או בנפחי המרות נמוכים. רמת סמך של 95% (ערך p ≤ 0.05) נחשבת לסטנדרט האקדמי ועשויה להתאים יותר לתוצאות מדויקות יותר לאורך פרק זמן ארוך יותר.
- הפעלת ניסויים למשך זמן מספיק: מומלץ להפעיל ניסויים למשך 4 שבועות לפחות כדי להביא בחשבון מחזורי ביצועים שבועיים, זמנים מהקליק להמרה ותקופות למידה.
- תקופת הרצה: בקמפיינים שמוגדר בהם בידינג אוטומטי או שבודקים תכונות חדשות, כדאי להתעלם מהנתונים של השבוע או השבועיים הראשונים כדי לאפשר למודלים של הבידינג ולרמות התנועה לעבור כיול מחדש בהתאם לפיצול.
- משתמשים בחלוקה של 50/50: חלוקת תנועה של 50/50 היא בדרך כלל הדרך המהירה ביותר להשיג תוצאות עם מובהקות סטטיסטית.
- תזמון מראש: מגדירים את תאריך ההתחלה של הניסוי למועד עתידי, 3-7 ימים קדימה, כדי לאפשר זמן לתהליכי הבדיקה והאישור של המודעות.
- בכל קמפיין אפשר להריץ רק ניסוי אחד בכל רגע נתון.