دو روش اصلی برای گزارش آزمایشها وجود دارد:
- گزارش مستقیم آزمایش : منبع
experimentرا برای معیارها جستجو کنید. این گزینه معیارهای مربوط به گروههای کنترل و درمان را در یک پاسخ واحد، همراه با دادههای مقایسه آماری مانند افزایش و مقادیر p ارائه میدهد. این تنها راه برای گزارش آزمایشهای درون کمپین است. - گزارش کمپین : با استفاده از
campaign.experiment_typeبرای تمایز بین کمپینهای پایه و آزمایشی، از منبعcampaignبرای معیارها پرسوجو کنید. این گزینه فقط برای آزمایشهایی که از کمپینهای کنترل و درمان جداگانه استفاده میکنند، مانند آزمایشهای مدیریتشده توسط سیستم، در دسترس است.
این راهنما در درجه اول بر گزارشدهی مستقیم آزمایش تمرکز دارد، که با همه انواع آزمایشهایی که از گزارشدهی پشتیبانی میکنند، سازگار است.
گزارش مستقیم آزمایش
شما میتوانید مستقیماً از منبع experiment پرسوجو کنید تا معیارهای عملکرد و مقایسههای آماری بین گروههای کنترل و درمان خود را بازیابی کنید.
معیارها و اهمیت آماری
برای معیارهای اصلی مانند کلیکها، نمایشها، هزینه، تبدیلها و ارزش تبدیل، منبع experiment ، هم معیارهای درمان (مثلاً metrics.clicks ) و هم معیارهای کنترل (مثلاً metrics.control_clicks ) را در یک ردیف ارائه میدهد.
همچنین فیلدهایی را ارائه میدهد که به شما در ارزیابی اهمیت آماری هرگونه تفاوت بین بازوها کمک میکند:
-
metrics.*_p_value: احتمال اینکه نتایج مشاهده شده در صورتی که آزمایش هیچ تأثیر واقعی بر متریک نداشته باشد، رخ دهند. مقدار p کمتر نشان دهنده اهمیت آماری بالاتر است. -
metrics.*_point_estimate: درصد افزایش تخمینی (مثبت یا منفی) در معیار داده شده برای بازوی درمان در مقایسه با بازوی کنترل. همراه باmargin_of_error، آنها یک بازه اطمینان با سطح اطمینان تجویز شده برای تفاوت تخمین زده شده را توصیف میکنند. کمیت تخمین زده شده (درمان / کنترل - ۱) است. تخمین نقطهای مرکز بازه اطمینان است. -
metrics.*_margin_of_error: شعاع بازه اطمینان، که درpoint_estimateقرار دارد. این بازه برای یک سطح اطمینان از پیش تعیینشده محاسبه میشود که به نوع آزمایش بستگی دارد.
فیلدهای اصلی متریک زیر در منبع experiment پشتیبانی میشوند، از جمله مقدار گروه درمان، مقدار گروه کنترل و فیلدهای آماری که قبلاً ذکر شدهاند:
-
clicks -
impressions -
cost_micros -
conversions -
cost_per_conversion -
conversion_value -
conversion_value_per_cost
برای تبدیلها، به طور خاص، فیلدهای آماری از طریق فیلدهای absolute_change زیر در دسترس هستند، نه به عنوان مقادیر نسبی:
-
metrics.conversions_absolute_change_p_value: مقدار p برای فرضیه صفر که آزمایش هیچ تاثیری بر تغییر مطلق تبدیلها ندارد. از ۰ تا ۱ متغیر است. -
metrics.conversions_absolute_change_point_estimate: تخمین نقطهای هنگام تخمین اثر آزمایش بر تغییر مطلق تبدیلها. -
metrics.conversions_absolute_change_margin_of_error: حاشیه خطا هنگام تخمین اثر آزمایش بر تغییر مطلق تبدیلها.
برای کمک به ساخت کوئریهای معتبر برای منبع experiment ، از ابزار Google Ads Query Builder استفاده کنید.
پرس و جوی نمونه
کوئری 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 بزرگتر از صفر باشد، نشان میدهد که بازوی درمان از نظر تبدیلها به طور قابل توجهی بهتر از بازوی کنترل عمل میکند.
در اینجا یک قطعه کد پایتون وجود دارد که نحوه ارزیابی نتایج بر اساس تخمینهای p-value و lift را نشان میدهد:
جاوا
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); } }
سی شارپ
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."); } }
پی اچ پی
This example is not yet available in PHP; you can take a look at the other languages.
پایتون
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." )
روبی
This example is not yet available in Ruby; you can take a look at the other languages.
پرل
This example is not yet available in Perl; you can take a look at the other languages.
حلقه زدن
مزایای آن نسبت به گزارش کمپین
گزارشدهی مستقیم آزمایش، مزایای متعددی نسبت به پرسوجوی جداگانه از گزارشهای کمپین ارائه میدهد:
- معیارهای متمرکز : معیارهای کنترل و درمان را در یک ردیف بازیابی کنید.
- دادههای اطمینان آماری : مقادیر p محاسبهشده، تخمینهای نقطهای و حاشیه خطا را ارائه میدهد.
- کارایی : نیاز به ادغام یا مقایسه دستی نتایج چندین گزارش را از بین میبرد.
- پشتیبانی درون کمپینی : این تنها راه برای مقایسه کنترل در مقابل درمان برای آزمایشهای درون کمپینی است، جایی که ترافیک در یک کمپین واحد تقسیم میشود.
گزارش کمپین
برای آزمایشهایی که کمپینهای درمانی جداگانهای ایجاد میکنند (برای مثال، SEARCH_CUSTOM )، میتوانید منبع campaign را جستجو کنید و campaign.experiment_type برای شناسایی کمپینهای BASE (کنترل) و EXPERIMENT (درمان) استفاده کنید. این رویکرد در صورتی مفید است که نیاز به بخشبندی معیارها در سطح جزئیتر (مثلاً بر اساس گروه تبلیغاتی یا کلمه کلیدی) یا مشاهده فرادادههای کمپین که در منبع experiment موجود نیست، داشته باشید. با این حال، مستلزم آن است که شما مقایسههای عملکرد و محاسبات آماری را به صورت دستی انجام دهید.
شما نمیتوانید از گزارشدهی در سطح کمپین برای مقایسهی گروههای مختلف برای آزمایشهای درون کمپینی استفاده کنید، زیرا تقسیم ترافیک به صورت داخلی در یک کمپین واحد اتفاق میافتد. جستجوی campaign برای یک آزمایش درون کمپینی، فقط مجموع کل را برمیگرداند.
بهترین شیوهها
- سطح اطمینان مناسبی را انتخاب کنید : تعیین آستانهی پایینتر برای مقدار p میتواند راهنماییهای جهتدار را سریعتر ارائه دهد، بهویژه با بودجهها یا حجم تبدیل کمتر. اطمینان ۹۵٪ (مقدار p <= ۰.۰۵) به عنوان استاندارد دانشگاهی در نظر گرفته میشود و ممکن است برای نتایج دقیقتر در یک بازه زمانی طولانیتر بهتر باشد.
- آزمایشها را به مدت کافی اجرا کنید : آزمایشها را حداقل به مدت ۴ هفته اجرا کنید تا چرخههای عملکرد هفتگی، تأخیرهای تبدیل و دورههای یادگیری را در نظر بگیرید.
- برای افزایش سرعت، زمان بدهید : برای کمپینهایی که از پیشنهاد قیمت خودکار یا آزمایش ویژگیهای جدید استفاده میکنند، ۱-۲ هفته اول دادهها را نادیده بگیرید تا مدلهای پیشنهاد قیمت و سطوح ترافیک، زمان داشته باشند تا دوباره با تقسیمبندی هماهنگ شوند.
- از تقسیمبندیهای ۵۰/۵۰ استفاده کنید : تقسیمبندی ترافیک ۵۰/۵۰ معمولاً سریعترین راه برای دستیابی به نتایج آماری معنادار است.
- از قبل برنامهریزی کنید : تاریخ شروع آزمایش خود را ۳ تا ۷ روز آینده تنظیم کنید تا زمان کافی برای بررسی و تأیید تبلیغات داشته باشید.
- شما فقط میتوانید در هر زمان معین، یک آزمایش برای هر کمپین اجرا کنید.