Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bu kılavuzda, reklam entegrasyonunuzda test reklamlarını nasıl alacağınız açıklanmaktadır. Reklamları Google reklamverenlerinden ödeme almadan tıklayabilmeniz için geliştirme sırasında test reklamlarını kullanmak önemlidir. Test modunda olmadan çok fazla sayıda reklamı tıklarsanız hesabınızın geçersiz etkinlik nedeniyle işaretlenme riski vardır.
Testi etkinleştirmenin en hızlı yolu, Google tarafından sağlanan demo reklam birimlerini kullanmaktır.
Bu reklam birimleri AdMob hesabınızla ilişkili değildir. Bu nedenle, hesabınızın bu reklam birimlerini kullanırken geçersiz trafik oluşturma riski yoktur.
Aşağıda, her biçim için belirli test reklam öğelerini işaret eden demo reklam birimleri verilmiştir:
Üretim odaklı reklamlarla daha titiz testler yapmak istiyorsanız artık cihazınızı test cihazı olarak yapılandırabilir ve AdMob kullanıcı arayüzünde oluşturduğunuz kendi reklam birimi kimliklerinizi kullanabilirsiniz. Test cihazları AdMob kullanıcı arayüzüne eklenebilir veya Google Mobile Ads SDK'sı kullanılarak programatik olarak eklenebilir.
Cihazınızı test cihazı olarak eklemek için aşağıdaki adımları uygulayın.
Test cihazınızı AdMob kullanıcı arayüzüne ekleme
Test cihazı eklemenin ve yeni veya mevcut uygulama derlemelerini test etmenin basit ve programatik olmayan bir yolu için AdMob kullanıcı arayüzünü kullanın.
Nasıl yapacağınızı öğrenin.
Test cihazınızı programatik olarak ekleme
Uygulamanızı geliştirirken reklamları test etmek istiyorsanız test cihazınızı programatik olarak kaydetmek için aşağıdaki adımları uygulayın.
Reklam entegre edilmiş uygulamanızı yükleyin ve reklam isteğinde bulunun.
Konsolda aşağıdaki gibi bir mesaj olup olmadığını kontrol edin:
Test cihazı kimliğini SetRequestConfiguration üzerinden ayarlamak için kodunuzu değiştirin:
// Set a sample device ID of 2077ef9a63d2b398840261c8221a0c9bfirebase::gma::RequestConfigurationrequest_configuration=firebase::gma::GetRequestConfiguration();request_configuration.test_device_ids.push_back("2077ef9a63d2b398840261c8221a0c9b");firebase::gma::SetRequestConfiguration(request_configuration);
Uygulamanızı yeniden çalıştırın. Reklam bir Google reklamıysa reklamın (banner, geçiş veya ödüllü reklam) üst kısmında ortalanmış bir Test modu etiketi görürsünüz:
Bu Test modu etiketine sahip reklamları tıklamak güvenlidir. Test modundaki reklamlarla ilgili istekler, gösterimler ve tıklamalar hesabınızın raporlarında gösterilmez.
Uyumlulaştırma ile test yapma
Google'ın demo reklam birimleri yalnızca Google reklamlarını gösterir. Uyumlulaştırma yapılandırmanızı test etmek için test cihazlarını etkinleştirme yaklaşımını kullanmanız gerekir.
Uyumlulaştırılmış reklamlarda Test modu etiketi oluşturulmaz. Bu ağların hesabınızı geçersiz etkinlik nedeniyle işaretlememesi için uyumlulaştırma ağlarınızın her birinde test modunun etkinleştirilmesini sağlamak sizin sorumluluğunuzdadır. Daha fazla bilgi için her ağın ilgili aracılık kılavuzuna bakın.
Bir uyumlulaştırma reklam ağı bağdaştırıcısının test modu sağlayıp sağlamadığından emin değilseniz geliştirme sırasında bu ağın reklamlarını tıklamaktan kaçınmanız en güvenli seçenektir. Hangi reklam ağının mevcut reklama hizmet verdiğini öğrenmek için ResponseInfo::mediation_adapter_class_name() yöntemini reklam biçimlerinden herhangi birinde kullanabilirsiniz.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-09-06 UTC."],[[["\u003cp\u003eThe Google Mobile Ads C++ SDK is deprecated and will be end-of-maintenance on June 17, 2025; consider using the iOS or Android SDKs instead.\u003c/p\u003e\n"],["\u003cp\u003eDuring development, utilize test ads by using Google's demo ad units or enabling test mode to prevent invalid activity flags on your account.\u003c/p\u003e\n"],["\u003cp\u003eReplace demo ad unit IDs with your own before publishing and remember that Android and iOS simulators are automatically configured as test devices.\u003c/p\u003e\n"],["\u003cp\u003eWhen enabling test mode programmatically, ensure to remove the test device ID code before releasing your app.\u003c/p\u003e\n"],["\u003cp\u003eMediated ads do not display a "Test mode" label; consult each network's mediation guide to ensure test mode is enabled and avoid clicking ads from networks without a confirmed test mode during development.\u003c/p\u003e\n"]]],["The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024, with maintenance ending June 17, 2025; AdMob's iOS and Android SDKs are recommended replacements. To test ads, use Google's demo ad units or enable test mode with your own. Demo units prevent invalid traffic, while test mode lets you configure your device, either in the AdMob UI or programmatically via the SDK, and use your own ad unit IDs. If using mediated ads, ensure each network is in test mode.\n"],null,["| **DEPRECATED:** The Google Mobile Ads C++ SDK is *deprecated* as of June 17, 2024 and should not be adopted in projects that don't already use it. It will enter *End-of-Maintenance (EoM)* on June 17, 2025. Note that versions of the SDK released before the EoM date will continue to function, but no further bug fixes or changes will be released after the EoM date.\n|\n| Instead of the Google Mobile Ads C++ SDK, consider using the\n| [iOS](/admob/ios/quick-start) and\n| [Android](/admob/android/quick-start) SDKs from AdMob.\n| For support, reach out to the\n| [Google Mobile Ads SDK Technical Forum](https://groups.google.com/g/google-admob-ads-sdk).\n\n\u003cbr /\u003e\n\nThis guide explains how to receive test ads in your ads integration. It is\nimportant to use test ads during development so that you can click on them\nwithout charging Google advertisers. If you click on too many ads without being\nin test mode, you risk your account being flagged for invalid activity.\n\nThere are two ways to get test ads:\n\n1. Use one of Google's [demo ad units](#demo_ad_units).\n\n2. Use your own ad unit and [enable test mode](#enable_test_devices).\n\nDemo ad units\n\nThe quickest way to enable testing is to use Google-provided demo ad units.\nThese ad units are not associated with your AdMob account, so there's no risk of\nyour account generating invalid traffic when using these ad units.\n| **Key Point:** Make sure you replace these IDs with your own ad unit ID before publishing your app.\n\nHere are demo ad units that point to specific test creatives for each format: \n\nAndroid\n\n| Ad format | Sample ad unit ID |\n|-----------------------------------------|------------------------------------------|\n| [Banner](/admob/cpp/banner) | `ca-app-pub-3940256099942544/6300978111` |\n| [Interstitial](/admob/cpp/interstitial) | `ca-app-pub-3940256099942544/1033173712` |\n| [Rewarded](/admob/cpp/rewarded) | `ca-app-pub-3940256099942544/5224354917` |\n\niOS\n\n| Ad format | Sample ad unit ID |\n|-----------------------------------------|------------------------------------------|\n| [Banner](/admob/cpp/banner) | `ca-app-pub-3940256099942544/2934735716` |\n| [Interstitial](/admob/cpp/interstitial) | `ca-app-pub-3940256099942544/4411468910` |\n| [Rewarded](/admob/cpp/rewarded) | `ca-app-pub-3940256099942544/1712485313` |\n\nEnable test devices (Test mode)\n\nIf you want to do more rigorous testing with production-looking ads, you can now\nconfigure your device as a test device and use your own ad unit IDs that you've\ncreated in the AdMob UI. Test devices can either be added in the AdMob UI or\nprogrammatically using the Google Mobile Ads SDK.\n\nFollow the steps below to add your device as a test device.\n| **Key Point:** Android and iOS simulators are automatically configured as test devices.\n\nAdd your test device in the AdMob UI\n\nFor a simple, non-programmatic way to add a test device and test new or existing\napp builds, use the AdMob UI.\n[Learn how](//support.google.com/admob/answer/9691433).\n| **Key Point:** New test devices typically start serving test ads in your app within 15 minutes, but it can also take up to 24 hours.\n\nAdd your test device programmatically\n\nIf you want to test ads in your app as you're developing, follow the steps below\nto programmatically register your test device.\n\n1. Load your ads-integrated app and make an ad request.\n\n2. Check the console for a message that looks like this:\n\n Android \n\n ```c++\n I/Ads: Use RequestConfiguration.Builder.setTestDeviceIds(Arrays.asList(\"33BE2250B43518CCDA7DE426D04EE231\"))\n to get test ads on this device.\"\n \n ```\n\n iOS \n\n ```c++\n \u003cGoogle\u003e To get test ads on this device, set:\n GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @\"2077ef9a63d2b398840261c8221a0c9b\" ];\n \n ```\n\n Copy your test device ID to your clipboard.\n | **Note:** Be sure to remove the code that sets these test device IDs before you release your app.\n3. Modify your code to set the test device ID through `SetRequestConfiguration`:\n\n ```c++\n // Set a sample device ID of 2077ef9a63d2b398840261c8221a0c9b\n firebase::gma::RequestConfiguration request_configuration =\n firebase::gma::GetRequestConfiguration();\n request_configuration.test_device_ids.push_back(\"2077ef9a63d2b398840261c8221a0c9b\");\n firebase::gma::SetRequestConfiguration(request_configuration);\n ```\n4. Re-run your app. If the ad is a Google ad, you'll see a **Test mode** label\n centered at the top of the ad (banner, interstitial, or rewarded ad):\n\nAds with this **Test mode** label are safe to click. Requests, impressions, and\nclicks on ads in test mode will not show up in your account's reports.\n| **Key Point:** Mediated ads do NOT render a **Test mode** label. See the section below for details.\n\nTesting with mediation\n\nGoogle's demo ad units only show Google ads. To test your mediation\nconfiguration, you must use the [enable test devices](#enable_test_devices)\napproach.\n\nMediated ads do not render a **Test mode** label. You are responsible for ensuring\nthat test mode is enabled for each of your mediation networks so that these\nnetworks don't flag your account for invalid activity. See each network's\nrespective [mediation guide](/admob/cpp/mediation) for more\ninformation.\n\nIf you aren't sure whether a mediation ad network adapter provides a test mode,\nit is safest to avoid clicking on ads from that network during development. You\ncan use the `ResponseInfo::mediation_adapter_class_name()` method on any of the\nad formats to figure out which ad network served the current ad."]]