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.
Các hàm chung sau đây có thể được dùng để kiểm soát một số thông tin nhất định
do SDK quảng cáo trên thiết bị di động thu thập.
Mã nhận dạng bên thứ nhất của nhà xuất bản, trước đây gọi là cùng một khoá ứng dụng
SDK C++ của quảng cáo trên thiết bị di động của Google sử dụng Mã nhận dạng bên thứ nhất của nhà xuất bản để giúp bạn
phân phối quảng cáo được cá nhân hóa và phù hợp hơn bằng cách sử dụng dữ liệu được thu thập từ ứng dụng
mà người dùng đang sử dụng.
Mã nhận dạng bên thứ nhất của nhà xuất bản được bật theo mặc định, nhưng bạn có thể tắt mã này bằng
đoạn mã sau trước khi khởi chạy:
SDK C++ của quảng cáo trên thiết bị di động của Google kiểm tra các ngoại lệ xảy ra trong một ứng dụng iOS và
ghi lại các sự kiện đó nếu là do SDK gây ra. Các ngoại lệ này được thu thập để chúng tôi
có thể ngăn chặn chúng trong các phiên bản SDK sau này.
Báo cáo sự cố được bật theo mặc định. Nếu bạn không muốn nhận các trường hợp ngoại lệ liên quan đến SDK
được ghi lại, bạn có thể tắt tính năng này bằng cách gọi hàm
Hàm DisableSDKCrashReporting(). Thời điểm tốt nhất để gọi phương thức này là khi
ứng dụng sẽ chạy:
Báo cáo sự cố không được hỗ trợ trên các thiết bị Android.
Sự đồng ý sử dụng cookie
Nếu ứng dụng của bạn có yêu cầu đặc biệt trên Android, bạn có thể đặt thuộc tính
SharedPreferencesgad_has_consent_for_cookies. Xem
Sự đồng ý cho phép sử dụng cookie
của hướng dẫn Cài đặt chung cho Android để biết thêm thông tin.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-21 UTC."],[[["\u003cp\u003eThe Google Mobile Ads C++ SDK is deprecated as of June 17, 2024 and will reach End-of-Maintenance on June 17, 2025, with no further updates or bug fixes after that date.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should consider using the iOS and Android SDKs from AdMob instead of the Google Mobile Ads C++ SDK.\u003c/p\u003e\n"],["\u003cp\u003eThe SDK includes features like Publisher first-party ID (enabled by default) for personalized ads and crash reporting (iOS only, enabled by default).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can control these features, including disabling Publisher first-party ID and crash reporting, using provided code snippets.\u003c/p\u003e\n"],["\u003cp\u003eFor Android, specific consent requirements related to cookies can be addressed using SharedPreferences.\u003c/p\u003e\n"]]],["The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024, and will reach End-of-Maintenance on June 17, 2025. Consider using the AdMob iOS and Android SDKs instead. Publisher first-party ID, enabled by default, can be disabled via `SetIsSameAppKeyEnabled(false)`. For iOS, crash reporting is on by default but can be disabled using `DisableSDKCrashReporting()`. Android consent for cookies can be set using `SharedPreferences` with `gad_has_consent_for_cookies`.\n"],null,["# Global Settings\n\n| **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\nThe following global functions may be used to control certain information\ncollected by the Mobile Ads SDK.\n\nPublisher first-party ID, formerly known as same app key\n--------------------------------------------------------\n\nThe Google Mobile Ads C++ SDK uses Publisher first-party ID to help you\ndeliver more relevant and personalized ads by using data collected from the app\nthe user is using.\n\nPublisher first-party ID is enabled by default, but you can disable it with the\nfollowing code prior to initialization: \n\n #include \"firebase/gma.h\"\n\n firebase::gma::SetIsSameAppKeyEnabled(/*is_enabled=*/false);\n\nCrash reporting (iOS Only)\n--------------------------\n\nThe Google Mobile Ads C++ SDK inspects exceptions that occur in an iOS app and\nrecords them if they are caused by the SDK. These exceptions are collected so we\ncan prevent them in future SDK versions.\n\nCrash reporting is enabled by default. If you don't want SDK-related exceptions\nto be recorded, you can disable this feature by calling the\n`DisableSDKCrashReporting()` function. The best time to call this method is when\nthe app launches: \n\n #include \"firebase/gma.h\"\n\n firebase::gma::DisableSDKCrashReporting();\n\nCrash reporting is not supported on Android devices.\n\nConsent for cookies\n-------------------\n\nIf your app has special requirements on Android, you can set the optional\n[`SharedPreferences`](//developer.android.com/reference/android/content/SharedPreferences)\n`gad_has_consent_for_cookies`. See the\n[Consent for cookies](/admob/android/global-settings#consent_for_cookies)\nsection of the Android Global Settings guide for more information."]]