Samouczek: optymalizacja częstotliwości wyświetlania reklam w AdMob za pomocą Firebase
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Samouczek dotyczący rozwiązania
Optymalizacja częstotliwości wyświetlania reklam przy jednoczesnym zachowaniu wysokiej jakości wrażeń użytkownika może być trudna, ale Firebase oferuje narzędzia, które pomogą Ci przeprowadzać testy, a potem podejmować oparte na danych decyzje dotyczące optymalnej częstotliwości wyświetlania reklam.
Za pomocą Firebase możesz przeprowadzać testy A/B skuteczności różnych częstotliwości wyświetlania reklam na niewielkiej grupie użytkowników.
Możesz obserwować wyniki testu i sprawdzać rekomendacje Firebase dotyczące tego, która częstotliwość wyświetlania reklam zapewnia lepsze wyniki przy minimalnym wpływie na utrzymanie użytkowników.
Gdy będziesz mieć pewność, że zmiany prawdopodobnie przyniosą pozytywne efekty, możesz wdrożyć je u większej liczby użytkowników jednym kliknięciem.
Czego się nauczysz
Z tego wieloetapowego samouczka dowiesz się, jak używać Firebase do testowania różnych limitów wyświetleń na użytkownika w przypadku Google AdMobreklam w aplikacji. Jako przykładu użyto reklam pełnoekranowych, ale możesz zastosować te same czynności do testowania limitów wyświetleń na użytkownika w przypadku innych formatów reklam.
W tym samouczku zakładamy, że w aplikacji używasz już AdMob i chcesz sprawdzić, czy zmiana częstotliwości wyświetlania jednostki reklamowej z reklamą pełnoekranową wpłynie na przychody z aplikacji lub inne dane. Jeśli jednak nie używasz jeszcze w aplikacji AdMob, nie musisz tego robić. Czynności opisane w tym samouczku pomogą Ci też określić, jakiej częstotliwości wyświetlania reklam należy używać w aplikacji.
Google AdMob umożliwia tworzenie jednostek reklamowych
o różnej częstotliwości wyświetlania lub odświeżania, które będą wyświetlane w Twojej
aplikacji. Gdy połączysz AdMob z Firebase, AdMob będzie przesyłać do Firebase informacje o przychodach z reklam, aby ulepszać optymalizację strategii reklamowej.
Google Analytics
Google Analytics dostarcza informacji o zaangażowaniu i utrzymaniu użytkowników oraz o danych dotyczących generowania przychodu, takich jak przychody ogółem, AdMob przychody, przychody z zakupów i wiele innych. Umożliwia też tworzenie list odbiorców i segmentów użytkowników.
Firebase Remote Config
Firebase Remote Config umożliwia dynamiczną zmianę i dostosowywanie działania oraz wyglądu aplikacji do wybranych segmentów użytkowników – a wszystko to bez publikowania nowej wersji aplikacji. W tym samouczku użyjesz parametrów Remote Config, aby określić, która jednostka reklamowa ma być wyświetlana użytkownikom.
Firebase A/B Testing
Firebase A/B Testing udostępnia interfejs i infrastrukturę do przeprowadzania w aplikacji eksperymentów dotyczących usług i marketingu. Rozdziela warianty eksperymentu między użytkowników, a następnie przeprowadza analizę statystyczną, aby określić, czy wariant eksperymentu osiąga lepsze wyniki niż grupa kontrolna na podstawie wybranego kluczowego wskaźnika, takiego jak przychody lub utrzymanie użytkowników.
Określ podstawy testowania, kierowanie i cele, na podstawie których będzie przeprowadzany test.
Zdefiniuj warianty testu i skonfiguruj parametr Remote Config, który będzie określać, która jednostka reklamowa będzie wyświetlana użytkownikom w ramach testu.
Po rozpoczęciu testu i odczekaniu kilku dni lub tygodni sprawdź w Firebase konsoli, czy test A/B ma zwycięski wariant na podstawie głównego celu testu.
Sprawdź wpływ każdego wariantu na dane dodatkowe, aby upewnić się, że nie spowodował on niezamierzonych negatywnych skutków w przypadku tych danych.
Jeśli A/B Testing uzna, że wariant wyświetlający nowy format reklamy jest zwycięski, możesz zacząć wyświetlać ten format wszystkim użytkownikom objętym eksperymentem, wszystkim użytkownikom aplikacji lub wybranej grupie użytkowników.
Jeśli nie udało się jeszcze wyłonić wyraźnego zwycięzcy, możesz kontynuować eksperyment, aby zebrać więcej danych, lub zakończyć go, jeśli trwa już od dłuższego czasu, a wyniki są niejednoznaczne.
Czego potrzebujesz
w Twojej aplikacji (projekt na iOS, Androida lub Unity);
Twoja aplikacja została zarejestrowana jako aplikacja Firebase połączona z AdMob aplikacją(więcej informacji).
Dostęp do powiązanego konta AdMob aplikacji z uprawnieniami do tworzenia nowych jednostek reklamowych.
Dostęp do powiązanego projektu Firebase aplikacji z uprawnieniami do tworzenia i zarządzania Remote Config oraz A/B Testing, a także do wyświetlania Google Analytics.
Preferowane IDE
Słowniczek
Wyświetlanie listy typowych terminów związanych z tym rozwiązaniem
AdMob przychody: AdMob przychody z sieci i Otwartego ustalania stawek
Przychody z zakupów w aplikacji: przychody z zakupów w aplikacji.
Łączne przychody: łączne przychody.
Utrzymanie: utrzymanie jako kluczowa wartość w testach A/B jest śledzone jako utrzymanie użytkowników przez 1 dzień, 2–3 dni, 4–7 dni, 8–14 dni lub ponad 15 dni.
Parametr Remote Config: konfigurowalny parametr używany do określania, która jednostka reklamowa ma być wyświetlana użytkownikom. W tym przewodniku będzie to identyfikator jednostki reklamowej.
Konfiguracja podstawowa: aktualna konfiguracja w dowolnym teście A/B, znana też jako grupa kontrolna. Zwykle używa ona wartości domyślnej parametru Remote Config, ale w razie potrzeby można ją skonfigurować tak, aby używała nowej wartości.
Konfiguracje wariantów: konfiguracje wariantów to alternatywne konfiguracje z różnymi wartościami parametru Remote Config, które chcemy przetestować w porównaniu z konfiguracją podstawową.
[null,null,["Ostatnia aktualizacja: 2025-08-23 UTC."],[],[],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*** ** * ** ***"]]