ทดสอบหน่วยโฆษณา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เครื่องมือตรวจสอบโฆษณารองรับการทดสอบต่อไปนี้
- การทดสอบในบริบท: โหลดโฆษณาจากหน่วยโฆษณาในแอป คุณสามารถเปิดเครื่องมือตรวจสอบโฆษณาเพื่อดูรายละเอียดเกี่ยวกับคำขอที่ส่งจากหน่วยโฆษณา
- การทดสอบนอกบริบท: ทดสอบหน่วยโฆษณาโดยตรงในเครื่องมือตรวจสอบโฆษณา
โดยไม่ต้องไปที่ UI ของแอป คุณสามารถทดสอบหน่วยโฆษณาหลายหน่วยพร้อมกัน โหลดและดูคำขอโฆษณาทดสอบแบบไม่พร้อมกัน และทำการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว
เมื่อเรียกใช้การทดสอบนอกบริบท คำขอของคุณจะไม่มีพารามิเตอร์
เพื่อเรียกใช้ใน UI ของแอป ซึ่งรวมถึงการกำหนดค่าการดูแลให้เหมาะสมกับเด็ก
การกำหนดเป้าหมายที่กำหนดเอง ส่วนเสริมเครือข่าย และขนาดต่างๆ เนื่องจากข้อจำกัดของคำขอเหล่านี้ เราขอแนะนำให้คุณใช้การทดสอบในบริบทใน UI ของแอป
ข้อกำหนดเบื้องต้น
ก่อนดำเนินการต่อ ให้ทำดังนี้
ขอโฆษณาทดสอบ
หากต้องการขอโฆษณาทดสอบในเครื่องมือตรวจสอบโฆษณา ให้ทำตามขั้นตอนต่อไปนี้ ดูรายละเอียดเพิ่มเติมได้ที่
วิธีใช้เครื่องมือตรวจสอบโฆษณาในแอป
ในบริบท
- ในอุปกรณ์ทดสอบ ให้ไปที่ UI ของแอปและโหลดโฆษณา
- เปิดเครื่องมือตรวจสอบโฆษณา ในแท็บหน่วยโฆษณา ให้ค้นหาหน่วยโฆษณาที่คุณ
โหลดโฆษณา
- ดูรายละเอียดเกี่ยวกับโฆษณาทดสอบที่ขอในบันทึกคําขอ SDK
Out-of-context:
- ในแท็บหน่วยโฆษณา ให้แตะหน่วยโฆษณา แล้วคลิกขอโฆษณาทดสอบ
- ดูรายละเอียดเกี่ยวกับโฆษณาทดสอบที่ขอในบันทึกคําขอ SDK

หากรูปแบบหน่วยโฆษณาแสดงเป็นไม่รู้จัก คุณจะเห็นขอโฆษณาทดสอบเป็นสีเทา
ทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว
เครื่องมือตรวจสอบโฆษณาสามารถจำกัดคำขอโฆษณาในแอปให้แสดงโฆษณาจากแหล่งที่มาของโฆษณาซึ่งใช้การเสนอราคาหรือสื่อกลางตามลำดับขั้นแหล่งเดียวได้
แนวทางนี้ช่วยให้คุณยืนยันได้ว่าได้ผสานรวมกับอะแดปเตอร์ของบุคคลที่สามอย่างถูกต้อง และแหล่งที่มาของโฆษณาแสดงโฆษณาตามที่คาดไว้
หากต้องการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว ให้ทำตามขั้นตอนต่อไปนี้
ในเครื่องมือตรวจสอบโฆษณา ให้คลิกปุ่มเปิด/ปิดการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว กล่องโต้ตอบการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียวจะปรากฏขึ้น
เลือกแหล่งที่มาของโฆษณาที่จะทดสอบ หลังจากนั้น คุณจะเห็นหน้าบังคับรีสตาร์ทแอป

การตั้งค่าการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียวจะมีผลกับคำขอโฆษณาทั้งหมดในอนาคตที่คุณส่ง
การทดสอบนี้ไม่มีผลกับโฆษณาที่แคชไว้ก่อนหน้านี้ในเซสชันนั้น
เราขอแนะนำให้คุณบังคับให้แอปรีสตาร์ทเมื่อใช้การทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว
วิธีนี้จะทำให้โฆษณาที่แคชไว้ซึ่งอาจแสดงแทนแหล่งที่มาของโฆษณาที่คุณเลือกไม่ถูกต้อง
แหล่งที่มาของโฆษณาที่คุณเลือกจะได้รับคำขอ
หลังจากรีสตาร์ทแอปแล้ว ตําแหน่งหน่วยโฆษณาทั้งหมดจะพยายามแสดงโฆษณาจาก
แหล่งที่มาของโฆษณาที่เลือก การเปิดใช้เครื่องมือตรวจสอบโฆษณาเมื่อการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว
ทำงานอยู่จะแสดงแหล่งที่มาของโฆษณาที่ใช้ในการทดสอบที่ทำงานอยู่

ในโหมดการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว คำขอโฆษณาทั้งหมดจะพยายามส่งโฆษณาจาก
แหล่งที่มาที่เลือก ไม่ว่าแหล่งที่มานั้นจะกำหนดค่าไว้สำหรับการเสนอราคาหรือ Waterfall หรือไม่ หากไม่ได้ตั้งค่าแหล่งที่มาของโฆษณาที่คุณกำลังทดสอบสำหรับการเสนอราคา
หรือการแสดงโฆษณาสื่อกลางตามลำดับขั้นสำหรับหน่วยโฆษณา คุณจะได้รับข้อความแสดงข้อผิดพลาดต่อไปนี้
Ad Unit has no applicable adapter for single ad source testing on network: AD_SOURCE_ADAPTER_CLASS_NAME
หากต้องการยืนยันว่าแหล่งที่มาของโฆษณาได้ส่งโฆษณาตามคำขอหลังจากเริ่มการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียวหรือไม่ ให้แตะหน่วยโฆษณาเพื่อดูบันทึกคำขอ SDK หากแหล่งที่มาของโฆษณา
โหลดโฆษณาไม่สำเร็จ ข้อความแสดงข้อผิดพลาดจะปรากฏขึ้นเพื่ออธิบายข้อผิดพลาด เช่น Adapter failed to initialize
หากคุณเพิ่มอินสแตนซ์หลายรายการของแหล่งที่มาที่เลือกลงใน Waterfall คุณจะเห็นอินสแตนซ์การเรียกแต่ละรายการไปยังแหล่งที่มาของโฆษณา กระบวนการนี้จะแสดงผลจนกว่าจะมีการส่งโฆษณา
หรือการแสดงโฆษณาสื่อกลางตามลำดับขั้นสิ้นสุดลงโดยไม่มีการส่งโฆษณา
หยุดการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว
หากต้องการหยุดการทดสอบ ให้ทำตามขั้นตอนต่อไปนี้
- ในเครื่องมือตรวจสอบโฆษณา ให้คลิกปิดปุ่มเปิด/ปิดการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว
กล่องโต้ตอบหยุดการทดสอบแหล่งที่มาของโฆษณาแหล่งเดียวไหมจะปรากฏขึ้น
แตะหยุดการทดสอบ

หากสำเร็จ ข้อความยืนยันจะปรากฏเหนือบังคับรีสตาร์ทแอป

หากต้องการเพิกถอนโฆษณาที่แคชไว้สำหรับแหล่งที่มาของโฆษณาที่ทดสอบ เราขอแนะนำให้คุณบังคับ
รีสตาร์ทแอปหลังจากหยุดการทดสอบ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-09-06 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-09-06 UTC"],[],[],null,["Select platform: [Android](/admob/android/ad-inspector/test-ad-units \"View this page for the Android platform docs.\") [iOS](/admob/ios/ad-inspector/test-ad-units \"View this page for the iOS platform docs.\") [Unity](/admob/unity/ad-inspector/test-ad-units \"View this page for the Unity platform docs.\") [Flutter](/admob/flutter/ad-inspector/test-ad-units \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nAd inspector supports the following tests:\n\n- **In-context testing**: load ads from the ad units in your app. You can open ad inspector to view details on requests made from ad units.\n- **Out-of-context testing**: test your ad unit directly in ad inspector without navigating to your app's UI. You can test multiple ad units at once, asynchronously load and view your test ad requests, and perform single ad source tests.\n\nWhen running an out-of-context test, your requests don't carry the parameters\nto run in your app's UI, including child-directed treatment configuration,\ncustom targeting, network extras, and different sizes. Due to the limitation of\nthese requests, we recommend you use in-context testing in your app's UI.\n\nPrerequisites\n\nBefore you continue, do the following:\n\n- Complete all items in the initial [Prerequisites](/admob/android/ad-inspector#prerequisites) to create an AdMob account, set your test device, initialize Google Mobile Ads SDK, and install the latest version.\n- [Launch ad inspector](/admob/android/ad-inspector/launch-ad-inspector).\n\nRequest a test ad\n\nTo request a test ad in ad inspector, complete the following steps. For more\ndetails, see\n\n[How to use ad inspector in your app](//support.google.com/admob/answer/13063114).\n\n\n- **In-context**:\n\n 1. On a test device, navigate to your app's UI and load an ad.\n 2. Open ad inspector. In the **Ad unit** tab, find the ad unit where you loaded the ad.\n 3. In **SDK request log**, view details on your requested test ad.\n- **Out-of-context**:\n\n 1. In the **Ad unit** tab, tap on your ad unit and click **Request test ad**.\n 2. In **SDK request log**, view details on your requested test ad.\n\n| **Note:** To request a test ad, [initialize the Google Mobile Ads SDK](/admob/android/quick-start#initialize_the_mobile_ads_sdk) with an `Activity` context.\n\nIf the ad unit format shows **Unknown** , you see **Request test ad** greyed\nout.\n\nTest a single ad source\n\nAd inspector can restrict ad requests in your app to serve ads from a single\nbidding or waterfall ad source. This approach lets you verify that you've\ncorrectly integrated with the third-party adapter, and the ad source serves\nas expected.\n\nTo test a single ad source, complete the following steps:\n\n1. In **Ad inspector** , click the **Single ad source test** toggle. A\n **Single ad source test** dialog appears:\n\n\n2. Select an ad source to test. Afterwards, you receive the\n **Force restart app** page:\n\nThe single ad source test setting applies to any future ad requests you make.\nThis test doesn't apply to previously cached ads in that session.\nWe recommend you to force restarting your app when applying a single ad source\ntest. This approach invalidates cached ads that might display instead of\nyour chosen ad source receiving a request.\n\nAfter restarting your app, all ad unit placements attempt to show an ad from the\nselected ad source. Launching ad inspector when a single ad source test is\nactive shows the active test ad source:\n\nIn single ad source test mode, all ad requests attempt to fill with the\nselected ad source, regardless of whether that ad source was configured for\nbidding or waterfall. If the ad source you're testing is not set up for bidding\nor waterfall for the ad unit, you receive the following error message: \n\n Ad Unit has no applicable adapter for single ad source testing on network: \u003cvar translate=\"no\"\u003eAD_SOURCE_ADAPTER_CLASS_NAME\u003c/var\u003e\n\nTo verify whether the ad source filled the ad requests after you start a single\nad source test, tap an ad unit to view the SDK request log. If the ad source\nfailed to load an ad, an error message appears describing the error, such\nas `Adapter failed to initialize`.\n\nIf you've added multiple instances of the selected ad source to a waterfall, you\nsee each call instance to the ad source. This process renders until the ad is\neither filled or the waterfall ends without a fill.\n\nStop a single ad source test\n\nTo stop the test, complete the following steps:\n\n1. In **Ad inspector** , click off the **Single ad source test** toggle. The **Stop single ad source test?** dialog appears.\n2. Tap **Stop test**.\n\n\n If successful, a confirmation message appears over **Force restart app**:\n\nTo revoke cached ads for the tested ad source, we recommend you to force\nrestart the app after stopping the test."]]