[null,null,["最后更新时间 (UTC):2025-08-23。"],[],[],null,["**Solution tutorial**\n\nOptimizing ad frequency while keeping a high-quality user experience can be\ntricky, but Firebase offers tools that help you test and then make data-driven\ndecisions about optimal ad frequency.\n\n- Using Firebase, you can A/B test the performance of various ad frequencies\n with a *small subset* of users.\n\n- You can observe the test results and review recommendations from Firebase\n about which ad frequency is performing better with minimal impact on\n retention.\n\n- Once you're confident that the changes will likely have a positive impact,\n you can roll out the changes to more of your users with a click of a button.\n\nWhat you'll learn \n\nIn this multistep tutorial, you'll learn **how to use Firebase to test various\nfrequency caps for Google AdMob ads in your app** . It uses\n[interstitial ads](https://support.google.com/admob/answer/7311435)\nas the example test case, but you can extrapolate and use these same steps to\ntest frequency capping for\n[other ad formats](https://support.google.com/admob/answer/6128738).\n\nThis tutorial assumes that you already use AdMob in your app and that you'd\nlike to test whether changing the *frequency* of an interstitial ad unit will\nhave an impact on your app's revenue or other metrics. However, if you don't already\nuse AdMob in your app, that's ok! The steps in this tutorial can also help\nyou understand what ad frequency you should use in your app.\n| **Tip:** If there's a term that you're not familiar with, check out the [glossary](#glossary) at the bottom of this page.\n\nLearn more about the business case and value for this solution in our\n[*Optimize AdMob ad frequency* solution overview](/docs/tutorials/optimize-ad-frequency/solution-overview).\n\nProducts and features used in this tutorial\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Google AdMob \u003e [Google AdMob](/docs/admob) enables you to create ad units with various ad frequencies or refresh rates that will be served within your app. When you link AdMob with Firebase, AdMob sends ad revenue information to Firebase to improve ad strategy optimization. Google Analytics \u003e [Google Analytics](/docs/analytics) gives you insight into user engagement, retention, and monetization metrics like total revenue, AdMob revenue, purchase revenue, and much more. It also allows you to create user audiences and segments. | Firebase Remote Config \u003e [Firebase Remote Config](/docs/remote-config) enables you to dynamically change and customize the behavior and appearance of your app for desired user segments --- *all without publishing a new version of your \u003e app* . In this tutorial, you'll use Remote Config parameters to control which ad unit is shown to your users. Firebase A/B Testing \u003e [Firebase A/B Testing](/docs/ab-testing) provides the interface and infrastructure to run product and marketing experiments in your app. It takes care of distributing experiment variants to users, and then performs statistical analysis to determine if an experiment variant is outperforming the control group based on your selected key metric, such as revenue or user retention. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nTutorial overview\n\n[Go\ndirectly to the step-by-step tutorial](/docs/tutorials/optimize-ad-frequency/step-1)\n\n1. [**Use AdMob to\n create new ad unit variants for testing**](/docs/tutorials/optimize-ad-frequency/step-1)\n\n 1. Create two new interstitial ad units in AdMob.\n\n 2. Set the *Frequency capping* of each ad unit to an impressions per user\n value that you want to test.\n\n 3. Implement the ad unit placements within your app's code.\n\n2. [**Set up an A/B test\n in the Firebase console**](/docs/tutorials/optimize-ad-frequency/step-2)\n\n 1. Define testing basics, targeting, and the goals that the test will run\n against.\n\n 2. Define test variants and set up the Remote Config parameter that\n will control which ad unit is shown to users in the test.\n\n3. [**Handle\n Remote Config parameter values in your app's code**](/docs/tutorials/optimize-ad-frequency/step-3)\n\n 1. Use the Remote Config parameter in your app.\n\n 2. Implement the logic for displaying the ad unit based on the parameter's\n value.\n\n4. [**Start the A/B test\n and review the test results in the Firebase console**](/docs/tutorials/optimize-ad-frequency/step-4)\n\n 1. After starting the test and allowing it to run for a few days or weeks,\n check the Firebase console for whether the A/B test has a winning\n variant based on the primary goal of the A/B test.\n\n 2. Review the impact on secondary metrics for each variant to ensure the\n variants didn't cause unintended negative impacts to those metrics.\n\n5. [**Decide whether to\n roll out the new ad unit with the updated ad frequency**](/docs/tutorials/optimize-ad-frequency/step-5)\n\n 1. If A/B Testing determines that the variant showing the new ad format\n is the winner, you can start showing the ad format to all users targeted\n in the experiment, all users of your app, or to a subset of your users.\n\n 2. If a clear winner isn't yet determined, you can either continue running\n the experiment to gather more data, or end the experiment if it's\n already been running for a long period with inconclusive results.\n\nWhat you'll need\n\n- Your own app (iOS, Android, or Unity project)\n\n- Your app registered as a Firebase App that's linked to an AdMob App\n ([learn more](//support.google.com/admob/answer/6383165))\n\n- Access to your app's associated AdMob account, with permissions to create\n new ad units\n\n- Access to your app's associated Firebase project, with permissions to create\n and manage Remote Config and A/B Testing as well as to view\n Google Analytics\n\n- Your preferred IDE\n\nGlossary\n\n\u003cbr /\u003e\n\nView a list of common terms for this solution\n\n\u003cbr /\u003e\n\n- **AdMob revenue** : AdMob network and open bidding revenue\n\n- **IAP revenue**: In app purchases revenue\n\n- **Total revenue**: Total revenue\n\n- **Retention**: Retention as a key metric in A/B tests is tracked as 1 day,\n 2-3 days, 4-7 days, 8-14 days, or 15+ days user retention\n\n- **Remote Config parameter**: The configurable parameter used to control\n which ad unit is show to users. In this guide, it will be an ad unit ID.\n\n- **Baseline configuration** : The as-is configuration in any particular A/B test\n --- also known as the control. The control usually uses the default value for\n the Remote Config parameter, but it can be configured to use a new control\n value if needed.\n\n- **Variant configurations** : The variant configurations are the alternative\n configurations with different Remote Config parameter values that we would\n like to test against the baseline configuration.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[**Step 1** : Use AdMob to create new ad unit variantsarrow_forward_ios](/docs/tutorials/optimize-ad-frequency/step-1)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]