Thử nghiệm loại mẫu quảng cáo
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chọn nền tảng:
Android
iOS
SDK Quảng cáo của Google trên thiết bị di động cung cấp một API cho phép bạn chỉ định loại mẫu quảng cáo cho các truy vấn thử nghiệm. Khi thông số này được đặt, chỉ những mẫu quảng cáo thuộc loại được chỉ định mới được truy xuất và hiển thị.
Cách sử dụng
Để chỉ định một loại mẫu quảng cáo, hãy thêm tham số ft_ctype
vào một đối tượng bổ sung rồi truyền đối tượng đó vào yêu cầu quảng cáo. Điều này có thể hạn chế những quảng cáo có sẵn và dẫn đến việc không có quảng cáo nào được hiển thị.
Kotlin
val extras = Bundle()
extras.putString("ft_ctype", "video_app_install")
val request = AdRequest
.Builder()
.addNetworkExtrasBundle(AdMobAdapter::class.java, extras)
.build()
Java
Bundle extras = new Bundle();
extras.putString("ft_ctype", "video_app_install");
AdRequest request = new AdRequest
.Builder()
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
Bảng sau đây liệt kê các giá trị hợp lệ cho ft_ctype
:
Loại quảng cáo |
ft_ctype |
Định dạng |
HTML5 |
html5 |
Biểu ngữ, quảng cáo xen kẽ, quảng cáo có tặng thưởng |
Hình ảnh cài đặt ứng dụng |
image_app_install |
Biểu ngữ, Gốc, Xen kẽ, Có tặng thưởng |
Hình ảnh hiển thị |
image_display |
Biểu ngữ, quảng cáo xen kẽ |
Hiển thị quảng cáo mẫu từng vùng |
partial_slot |
Biểu ngữ, Quảng cáo gốc, Quảng cáo xen kẽ |
Văn bản cài đặt ứng dụng |
text_app_install |
Biểu ngữ, Quảng cáo gốc, Quảng cáo xen kẽ |
Văn bản hiển thị |
text_display |
Biểu ngữ, Quảng cáo gốc, Quảng cáo xen kẽ |
Trueview |
trueview |
Quảng cáo xen kẽ, Quảng cáo có tặng thưởng |
Quảng cáo video cài đặt ứng dụng |
video_app_install |
Biểu ngữ, Gốc, Xen kẽ, Có tặng thưởng |
Tính năng này chỉ ảnh hưởng đến quảng cáo trên Google. Nếu đơn vị quảng cáo của bạn bật tính năng dàn xếp, thì quảng cáo được trả về từ các nguồn quảng cáo của bên thứ ba sẽ không tuân theo tham số ft_ctype
. Bạn nên thử nghiệm với một đơn vị quảng cáo chưa bật tính năng dàn xếp.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-09-02 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-09-02 UTC."],[[["\u003cp\u003eThe Google Mobile Ads SDK allows you to specify a desired creative type for test queries, ensuring only creatives of that type are retrieved and rendered.\u003c/p\u003e\n"],["\u003cp\u003eTo use this feature, set the \u003ccode\u003eft_ctype\u003c/code\u003e request parameter within a bundle of extras in test mode, specifying the desired creative type like "video_app_install" or "html5".\u003c/p\u003e\n"],["\u003cp\u003eThis feature works with various creative types, formats, and ad units, as detailed in the provided table mapping creative types to their corresponding \u003ccode\u003eft_ctype\u003c/code\u003e values.\u003c/p\u003e\n"],["\u003cp\u003eWhile useful for testing, using \u003ccode\u003eft_ctype\u003c/code\u003e may increase the chance of no fills and only affects Google ads, not those from third-party ad networks through mediation.\u003c/p\u003e\n"]]],["The Google Mobile Ads SDK allows specifying a creative type for test ad queries using the `ft_ctype` parameter within an extras object, passed to the ad request. This restricts ads to the defined type, potentially resulting in no fill. Valid `ft_ctype` values include `html5`, `image_app_install`, `video_app_install`, and others, each with supported formats (e.g., Banner, Interstitial). This parameter only works in test mode and impacts only Google ads, not third-party ads from mediated sources.\n"],null,["Select platform: [Android](/admob/android/test-creative-types \"View this page for the Android platform docs.\") [iOS](/admob/ios/test-creative-types \"View this page for the iOS platform docs.\")\n\n\u003cbr /\u003e\n\nGoogle Mobile Ads SDK provides an API that lets you specify a creative type\nfor test queries. When the parameter is set, only creatives of the specified\ntype are retrieved and rendered.\n\nUsage\n\nTo specify a creative type, include the `ft_ctype` parameter in an extras object\nand pass it to the ad request. This may restrict which ads are available and\nresult in no fill.\n**Note:** The `ft_ctype` parameter only works in [Test Mode](/admob/android/test-ads#enable_test_devices). \n\nKotlin \n\n val extras = Bundle()\n extras.putString(\"ft_ctype\", \"video_app_install\")\n\n val request = AdRequest\n .Builder()\n .addNetworkExtrasBundle(AdMobAdapter::class.java, extras)\n .build()\n\nJava \n\n Bundle extras = new Bundle();\n extras.putString(\"ft_ctype\", \"video_app_install\");\n\n AdRequest request = new AdRequest\n .Builder()\n .addNetworkExtrasBundle(AdMobAdapter.class, extras)\n .build();\n\nThe following table lists the valid values for `ft_ctype`:\n\n| Creative Type | ft_ctype | Format |\n|----------------------|-------------------|----------------------------------------|\n| HTML5 | html5 | Banner, Interstitial, Rewarded |\n| App install image | image_app_install | Banner, Native, Interstitial, Rewarded |\n| Display image | image_display | Banner, Interstitial |\n| Display partial slot | partial_slot | Banner, Native, Interstitial |\n| App install text | text_app_install | Banner, Native, Interstitial |\n| Display text | text_display | Banner, Native, Interstitial |\n| Trueview | trueview | Interstitial, Rewarded |\n| App install video | video_app_install | Banner, Native, Interstitial, Rewarded |\n\nThis feature impacts Google ads only. If your ad unit enables\n[mediation](/admob/android/mediation), ads returned from third-party ad sources don't\nrespect the `ft_ctype` parameter. We recommend testing with an ad unit that\ndoesn't have mediation enabled."]]