اکنون که یک واحد تبلیغاتی جدید در برنامه خود پیادهسازی کردهاید، باید یک تست A/B راهاندازی کنید که به شما در درک عملکرد این واحد تبلیغاتی کمک میکند. شما تعیین می کنید که کدام کاربران را در آزمون هدف قرار دهید و همچنین اهداف آزمایشی خود را تعیین می کنید. همچنین باید انواع آزمایشی خود را تعریف کنید (واحدهای مختلف تبلیغات در برنامه خود) و پارامتر Remote Config را تنظیم کنید که نمایش انواع در برنامه شما را کنترل می کند.
Firebase A/B Testing از محصولات زیر برای آزمایش و تحلیل اثرات افزودن یک واحد تبلیغاتی به برنامه شما استفاده میکند:
Firebase A/B Testing (این مرحله) - اهداف و پارامترهای قابل تنظیم را برای آزمایش خود تعریف کنید
Firebase Remote Config (مرحله بعدی) - منطق را به کد خود اضافه کنید تا پیکربندی پارامترها را مدیریت کنید
Google Analytics (در پشت صحنه اجرا می شود) - تأثیر پیکربندی ها را اندازه گیری می کند
یک تست A/B جدید را آغاز کنید
برای شروع یک آزمایش کنترلشده برای اتخاذ یک قالب آگهی جدید، با رفتن به بخش A/B Testing کنسول Firebase شروع کنید. روی ایجاد آزمایش کلیک کنید، سپس Remote Config را انتخاب کنید.
اصول اولیه را تنظیم کنید
در قسمت Basics نام آزمایش را تعریف کرده و توضیحات آزمایش را ارائه دهید.
رابط کاربری کنسول Firebase نحوه تنظیم اصول اولیه تست A/B را نشان میدهد" class="screenshot">
هدف گذاری را تنظیم کنید
در بخش Targeting ، برنامه iOS یا Android مورد نظر آزمایش را انتخاب کنید.
درصد کاربرانی که در معرض آزمایش قرار میگیرند را تنظیم کنید. برای این آموزش، واحد تبلیغات جدید با 10 درصد از کاربران شما تست می شود. توجه داشته باشید که این بدان معنا نیست که 10٪ از همه کاربران شما قالب تبلیغات جدید را می بینند. این بدان معنی است که 10٪ از کاربران شما بخشی از آزمایش برای دیدن یا عدم مشاهده قالب تبلیغات جدید خواهند بود.
تمام تنظیمات دیگر را به عنوان پیش فرض خود بگذارید.
رابط کاربری کنسول Firebase نحوه تنظیم هدف گیری تست A/B را نشان می دهد" class="screenshot">
اهداف خود را تنظیم کنید
Firebase A/B Testing یک معیار اصلی را برای تعیین نوع برنده ردیابی می کند، اما همچنین به شما امکان می دهد معیارهای ثانویه را اضافه کنید تا تأثیرات پیکربندی های مختلف را بر سایر عوامل مهم برنامه خود درک کنید.
برای این آموزش، بهینه سازی درآمد تخمینی AdMob هدف اصلی است، بنابراین آن را از منوی کشویی انتخاب کنید.
(اختیاری) اگر میخواهید A/B Testing معیارهای بیشتری را ردیابی کند، مانند درآمد کل تخمینی یا نرخهای نگهداری متفاوت، آنها را با کلیک روی «افزودن متریک» انتخاب کنید.
رابط کاربری کنسول Firebase نحوه تنظیم اهداف تست A/B" class="screenshot"> را نشان می دهد
انواع را تنظیم کنید
آخرین مرحله پیکربندی تست A/B، تعریف پارامتر Remote Config است که کنترل میکند آیا واحد تبلیغات جدید به کاربران نشان داده میشود.
در قسمت Variants با تایپ کردن آن در قسمت Parameter کارت Baseline یک پارامتر جدید به نام SHOW_NEW_AD_KEY ایجاد کنید.
راه اندازی بخش Variants را با استفاده از تنظیمات زیر برای پارامتر SHOW_NEW_AD_KEY به پایان برسانید:
نوع پایه : مقدار روی false تنظیم شده است (به این معنی: قالب آگهی جدید نشان داده نشود )
Variant A variant: مقدار روی true تنظیم شده است (به معنی: نمایش قالب آگهی جدید)
برای این آموزش، نوع Baseline به هیچ وجه قالب تبلیغات جدید را به کاربران نشان نمی دهد ، اما نوع A فرمت تبلیغات جدید را به زیرمجموعه کوچکی از کاربران نشان می دهد . این توسط مقدار بولی پارامتر کنترل می شود. این مقادیر در اینجا در Firebase A/B Testing تنظیم شدهاند، اما در واقع Firebase Remote Config است که این مقادیر را برای مدیریت به کد برنامه شما ارسال میکند. در مرحله بعد Remote Config را تنظیم خواهید کرد.
رابط کاربری کنسول Firebase نحوه راهاندازی انواع تست A/B را نشان میدهد" class="screenshot">
برای اطمینان از اینکه آزمایش شما همانطور که انتظار می رود تنظیم شده است، روی مرور کلیک کنید. با این حال، قبل از اینکه بتوانید آزمایش را شروع کنید، باید نحوه واکنش کد برنامه شما به مقدار پارامتر true یا false دریافت شده از Firebase را مشخص کنید. برای اجرای نحوه کنترل Remote Config پارامتر SHOW_NEW_AD_KEY به مرحله بعدی بروید.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["Step 2: Set up an A/B test in the Firebase console\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nNow that you have a new ad unit implemented in your app, you need to set up an\nA/B test that will help you understand how this ad unit performs. You'll define\nwhich users to target in the test as well as your testing goals. You'll also\nneed to define your test variants (the different ad units in your app) and set\nup the Remote Config parameter which will control the display of the\nvariants in your app.\n\nFirebase A/B Testing utilizes the following products to test and analyze the\neffects of adding an ad unit to your app:\n\n- Firebase A/B Testing (this step) --- define goals and configurable parameters for your test\n- Firebase Remote Config (next step) --- add logic to your code to handle the configuration of the parameters\n- Google Analytics (runs behind the scenes) --- measures the impact of the configurations\n\n**Initiate a new A/B test**\n\nTo initiate a controlled test over adopting a new ad format, start by navigating\nto the *A/B Testing* section of the Firebase console. Click **Create\nexperiment** , then select **Remote Config**.\n\n**Set up the basics**\n\nIn the *Basics* section, define the experiment name and provide the\nexperiment description.\nFirebase console UI showing how to set up the basics of A/B test\" class=\"screenshot\"\\\u003e\n\n**Set up targeting**\n\n1. In the *Targeting* section, select the iOS or Android app that the\n experiment will target.\n\n2. Set the percentage of users who will be exposed to the experiment. For this\n tutorial, the new ad unit will be tested with 10% of your users. Note that\n this doesn't mean that 10% of all your users will see the new ad format;\n this means that 10% of your users will be part of the experiment to see or\n not see the new ad format.\n\n Leave all other settings as their defaults.\n\nFirebase console UI showing how to set up the targeting of A/B test\" class=\"screenshot\"\\\u003e **Note:** Due to the different user behavior patterns observed from iOS and Android users, each A/B test can only target either the iOS or Android version of your app.\n|\n| To run the same test for both versions of your app, set up an experiment\n| for one version of your app, then duplicate the test settings in a second\n| experiment. In this second experiment, select the other version of your app\n| in the *Targeting* section.\n\n**Set up your goals**\n\nFirebase A/B Testing tracks a primary metric to determine the winning\nvariant, but it also allows you to add secondary metrics to understand the\nimpacts of different configurations on other important factors for your app.\n\n1. For this tutorial, *Estimated AdMob revenue* optimization is the primary\n goal, so select it from the dropdown menu.\n\n2. *(Optional)* If you want A/B Testing to track additional metrics, like\n *Estimated total revenue* or different retention rates, select those by\n clicking **Add metric**.\n\nFirebase console UI showing how to set up the goals of A/B test\" class=\"screenshot\"\\\u003e\n\n**Set up the variants**\n\nThe last step of configuring an A/B test is defining a Remote Config\nparameter that controls whether the new ad unit will be shown to users.\n\n1. In the *Variants* section, create a new parameter named\n `SHOW_NEW_AD_KEY` by typing it in the *Parameter* field of the\n *Baseline* card.\n\n2. Finish setting up the *Variants* section using the following settings\n for the `SHOW_NEW_AD_KEY` parameter:\n\n - ***Baseline*** variant: *Value* set to `false` (which means: do ***not*** show new ad format)\n - ***Variant A*** variant: *Value* set to `true` (which means: show new ad format)\n\n For this tutorial, the *Baseline* variant ***will not show*** the new ad\n format to users at all, but the *Variant A* variant ***will show*** the\n new ad format to a small subset of users. This is controlled by the\n parameter's boolean value. These values are set here in\n Firebase A/B Testing, but it's actually Firebase Remote Config\n that sends these values to your app's code for handling. You'll set up\n Remote Config in the next step.\n | **Note:** In your own future tests, if you set up various experiments and variants, we recommend giving variants meaningful names to easily track the test results later on.\n\nFirebase console UI showing how to set up the variants of A/B test\" class=\"screenshot\"\\\u003e\n\nClick **Review** to make sure your experiment is set up as expected. However,\nbefore you can actually start the experiment, you need to define how your app's\ncode will react to the `true` or `false` parameter value received from Firebase.\nProceed to the next step to implement how Remote Config handles the\n`SHOW_NEW_AD_KEY` parameter.\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[arrow_back_ios**Step 1** : Use AdMob to create a new ad unit variant](/docs/tutorials/test-ad-format-adoption/step-1)\n[**Step 3** : Handle Remote Config parameter valuesarrow_forward_ios](/docs/tutorials/test-ad-format-adoption/step-3)\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]