Maintenant que vous avez implémenté un nouveau bloc d'annonces dans votre application, vous devez configurer un test A/B qui vous aidera à comprendre les performances de ce bloc d'annonces. Vous définirez les utilisateurs à cibler dans le test, ainsi que vos objectifs de test. Vous devrez également définir vos variantes de test (les différentes unités d'annonces de votre application) et configurer le paramètre Remote Config, qui contrôlera l'affichage des variantes dans votre application.
Firebase A/B Testing utilise les produits suivants pour tester et analyser les effets de l'ajout d'un bloc d'annonces à votre application:
Firebase A/B Testing (cette étape) : définissez les objectifs et les paramètres configurables de votre test
Firebase Remote Config (étape suivante) : ajoutez une logique à votre code pour gérer la configuration des paramètres.
Google Analytics (s'exécute en arrière-plan) : mesure l'impact des configurations
Lancer un nouveau test A/B
Pour lancer un test contrôlé sur l'adoption d'un nouveau format d'annonce, commencez par accéder à la section A/B Testing de la console Firebase. Cliquez sur Créer un test, puis sélectionnez Remote Config.
Configurer les paramètres de base
Dans la section Principes de base, précisez le nom du test et sa description.
UI de la console Firebase montrant comment configurer les bases du test A/B"
class="screenshot">
Configurer le ciblage
Dans la section Ciblage, sélectionnez l'application iOS ou Android qui fera l'objet du test.
Définissez le pourcentage d'utilisateurs qui seront exposés au test. Pour ce tutoriel, le nouveau bloc d'annonces sera testé auprès de 10% de vos utilisateurs. Notez que cela ne signifie pas que 10% de tous vos utilisateurs verront le nouveau format d'annonce. Cela signifie que 10% de vos utilisateurs participeront au test pendant lequel ils verront ou non le nouveau format d'annonce.
Conservez les valeurs par défaut de tous les autres paramètres.
UI de la console Firebase montrant comment configurer le ciblage du test A/B"
class="screenshot">
Définir vos objectifs
Firebase A/B Testing suit une métrique principale pour déterminer la variante gagnante. Cette fonctionnalité vous permet également d'ajouter des métriques secondaires pour comprendre l'incidence de différentes configurations sur d'autres facteurs importants pour votre application.
Pour ce tutoriel, l'optimisation des revenus estimés de AdMob est l'objectif principal. Sélectionnez-la dans le menu déroulant.
(Facultatif) Si vous souhaitez que A/B Testing suive d'autres métriques, comme les revenus totaux estimés ou différents taux de fidélisation, sélectionnez-les en cliquant sur Ajouter une métrique.
Interface utilisateur de la console Firebase montrant comment configurer les objectifs du test A/B"
class="screenshot">
Configurer les variantes
La dernière étape de la configuration d'un test A/B consiste à définir un paramètre Remote Config qui contrôle si le nouveau bloc d'annonces sera diffusé auprès des utilisateurs.
Dans la section Variantes, créez un paramètre nommé SHOW_NEW_AD_KEY en le saisissant dans le champ Paramètre de la fiche Étalonnage.
Terminez de configurer la section Variantes à l'aide des paramètres suivants pour le paramètre SHOW_NEW_AD_KEY:
Variante de référence : valeur définie sur false (ce qui signifie que le nouveau format d'annonce ne doit pas être diffusé)
Variante Variante A : Valeur définie sur true (ce qui signifie "Afficher le nouveau format d'annonce")
Pour ce tutoriel, la variante de référencene présentera pas du tout le nouveau format d'annonce aux utilisateurs, tandis que la variante Al'affichera auprès d'un sous-ensemble réduit d'utilisateurs. Ce paramètre est contrôlé par la valeur booléenne du paramètre. Ces valeurs sont définies ici dans Firebase A/B Testing, mais c'est Firebase Remote Config qui les envoie au code de votre application pour traitement. Vous configurerez Remote Config à l'étape suivante.
UI de la console Firebase montrant comment configurer les variantes du test A/B"
class="screenshot">
Cliquez sur Vérifier pour vous assurer que votre test est configuré comme vous le souhaitez. Toutefois, avant de pouvoir lancer le test, vous devez définir la réaction du code de votre application en fonction de la valeur du paramètre true ou false reçue de Firebase.
Passez à l'étape suivante pour implémenter la façon dont Remote Config gère le paramètre SHOW_NEW_AD_KEY.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/24 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/24 (UTC)."],[],[],null,["Step 2: Set up an A/B test in the Firebase console\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------|\n| Introduction: [Test new AdMob ad format adoption using Firebase](/docs/tutorials/test-ad-format-adoption) |\n| Step 1: [Use AdMob to create a new ad unit variant for testing](/docs/tutorials/test-ad-format-adoption/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/test-ad-format-adoption/step-3) |\n| Step 4: [Start the A/B test and review the test results in the Firebase console](/docs/tutorials/test-ad-format-adoption/step-4) |\n| Step 5: [Decide whether to roll out the new ad format](/docs/tutorials/test-ad-format-adoption/step-5) |\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*** ** * ** ***"]]