Ahora que implementaste nuevas unidades de anuncio en tu app, debes configurar una prueba A/B que te ayude a comprender el rendimiento de las unidades de anuncios. Definirás
a qué usuarios orientar la prueba, así como tus objetivos de prueba. También deberás
debes definir las variantes de prueba (las diferentes unidades de anuncios de tu app) y
el parámetro Remote Config, que controlará la visualización de la
variantes en tu app.
Firebase A/B Testing usa los siguientes productos para probar y analizar los efectos de agregar una unidad de anuncios a tu app:
Firebase A/B Testing (este paso): Define objetivos y configura
parámetros para tu prueba
Firebase Remote Config (paso siguiente): Agrega lógica a tu código para controlar la configuración de los parámetros
Google Analytics (se ejecuta en segundo plano): Mide el impacto de las
parámetros de configuración
Inicia una nueva prueba A/B
Para iniciar una prueba controlada de optimización de la frecuencia de los anuncios, comience por navegar
a la sección A/B Testing de la consola de Firebase. Haz clic en Crear.
experimento y, luego, selecciona Remote Config.
IU de Firebase console que muestra cómo iniciar una prueba A/B con Remote Config"
class="screenshot">
Configura los aspectos básicos
En la sección Basics, define el nombre del experimento y proporciona su descripción.
IU de Firebase console que muestra cómo configurar los aspectos básicos de las pruebas A/B"
class="screenshot">
Configura la segmentación
En la sección Targeting, selecciona la app para iOS o Android a la que se orientará el experimento.
Establece el porcentaje de usuarios que se expondrán al experimento. En este instructivo, las nuevas unidades de anuncios se probarán con el 30% de tus usuarios. Ten en cuenta que esto no significa que el 30% del total de usuarios verá las nuevas unidades de anuncios con mayores límites de frecuencia. Esto significa que el 30% de los usuarios se expondrá a los dos anuncios intersticiales nuevos junto con la unidad de anuncios de referencia (el anuncio existente).
Deja los valores predeterminados en las demás opciones de configuración.
IU de Firebase console que muestra cómo configurar la segmentación de las pruebas A/B
class="captura de pantalla">
.
Configura tus objetivos
Firebase A/B Testing hace un seguimiento de una métrica principal para determinar la ganadora.
pero también permite agregar métricas secundarias para comprender el
de las diferentes configuraciones
sobre otros factores importantes de tu app.
Para este instructivo, la optimización de ingresos estimados de AdMob es la principal
así que selecciónalo en el menú desplegable.
(Opcional) Si deseas que A/B Testing haga un seguimiento de métricas adicionales, como
Ingresos totales estimados o diferentes tasas de retención, selecciónalos por
Haz clic en Agregar métrica.
IU de Firebase console que muestra cómo configurar los objetivos de las pruebas A/B
class="captura de pantalla">
.
Configura las variantes
El último paso para configurar una prueba A/B es definir un Remote Config.
parámetro que controla qué unidad de anuncios se mostrará a los usuarios.
En la sección Variants, crea un parámetro nuevo llamado INTERSTITIAL_AD_KEY. Para ello, escríbelo en el campo Parameter de la tarjeta Baseline.
Termina de configurar la sección Variants con la siguiente configuración para el parámetro INTERSTITIAL_AD_KEY:
Variante Baseline: Value establecido en el ID de la unidad de anuncios existente con el parámetro de configuración de limitación de frecuencia de 4 impresiones por usuario cada 10 minutos
Variante Variant A: Value establecido en el ID de la nueva unidad de anuncios con el parámetro de configuración de limitación de frecuencia de 6 impresiones por usuario cada 10 minutos
Variante Variant B: Value establecido en el ID de la nueva unidad de anuncios con el parámetro de configuración de limitación de frecuencia de 8 impresiones por usuario cada 10 minutos
En este instructivo, la variante Baseline mostrará la unidad de anuncios existente (4 impresiones por usuario cada 10 minutos). Las variantes Variant A y Variant B mostrarán las nuevas unidades de anuncios (6 y 8 impresiones por usuario cada 10 minutos, respectivamente) a un pequeño subconjunto de usuarios. Esto lo controla el
valor del parámetro, que es el ID de la unidad de anuncios tomado de la IU de AdMob. Estos valores de parámetros se establecen aquí en Firebase A/B Testing, pero en realidad es Firebase Remote Config quien envía estos valores al código de tu app para su manejo. Configurarás Remote Config en el siguiente paso.
IU de Firebase console que muestra cómo configurar las variantes de la prueba A/B
class="captura de pantalla">
.
Haz clic en Review para asegurarte de que el experimento esté configurado según lo esperado. Sin embargo, antes de que puedas iniciar el experimento, debes definir cómo reaccionará el código de tu app a los valores de los parámetros recibidos de Firebase. Continúa con el
siguiente paso para implementar cómo Remote Config controla el INTERSTITIAL_AD_KEY
parámetro.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-25 (UTC)"],[],[],null,["Step 2: Set up an A/B test in the Firebase console\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------|\n| Introduction: [Optimize AdMob ad frequency using Firebase](/docs/tutorials/optimize-ad-frequency) |\n| Step 1: [Use AdMob to create new ad unit variants for testing](/docs/tutorials/optimize-ad-frequency/step-1) |\n| **Step 2: Set up an A/B test in the Firebase console** \u003cbr /\u003e |\n| Step 3: [Handle Remote Config parameter values in your app's code](/docs/tutorials/optimize-ad-frequency/step-3) |\n| Step 4: [Start the A/B test and review the test results in the Firebase console](/docs/tutorials/optimize-ad-frequency/step-4) |\n| Step 5: [Decide whether to roll out the new ad format](/docs/tutorials/optimize-ad-frequency/step-5) |\n\n\u003cbr /\u003e\n\nNow that you have new ad units implemented in your app, you need to set up an\nA/B test that will help you understand how these ad units perform. 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 for optimizing ad frequency, start by navigating\nto the *A/B Testing* section of the Firebase console. Click **Create\nexperiment** , then select **Remote Config**.\nFirebase console UI showing how to start an A/B test using Remote Config\" class=\"screenshot\"\\\u003e\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 units will be tested with 30% of your users. Note that\n this doesn't mean that 30% of all your users will see the new ad units with\n increased frequency caps; this means that 30% of your users will be exposed\n to the two new interstitial ads along with the baseline ad unit (your\n existing ad).\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 which ad unit will be shown to users.\n\n1. In the *Variants* section, create a new parameter named\n `INTERSTITIAL_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 `INTERSTITIAL_AD_KEY` parameter:\n\n - ***Baseline*** variant: *Value* set to the ad unit ID of the existing ad unit with the frequency cap setting of 4 impressions per user per 10 minutes\n - ***Variant A*** variant: *Value* set to the ad unit ID of the new ad unit with the frequency cap setting of 6 impressions per user per 10 minutes\n - ***Variant B*** variant: *Value* set to the ad unit ID of the new ad unit with the frequency cap setting of 8 impressions per user per 10 minutes\n\n For this tutorial, the *Baseline* variant will show the existing ad unit\n (4 impressions per user per 10 minutes). *Variant A* and *Variant B* will\n show the new ad units (6 and 8 impressions per user per 10 minutes,\n respectively) to a small subset of users. This is controlled by the\n parameter's value which is the ad unit ID taken from the AdMob UI. These\n parameter values are set here in Firebase A/B Testing, but it's actually\n Firebase Remote Config that sends these values to your app's code for\n handling. You'll set up 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 parameter values received from Firebase. Proceed to the\nnext step to implement how Remote Config handles the `INTERSTITIAL_AD_KEY`\nparameter.\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[arrow_back_ios**Step 1** : Use AdMob to create new ad unit variants](/docs/tutorials/optimize-ad-frequency/step-1)\n[**Step 3** : Handle Remote Config parameter valuesarrow_forward_ios](/docs/tutorials/optimize-ad-frequency/step-3)\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]