通用設定
下列全域函式可用於控管特定資訊
原本由 Mobile Ads SDK 收集的資料
Google Mobile Ads C++ SDK 使用發布商第一方 ID
運用從應用程式收集的資料,放送關聯性更高的個人化廣告
使用者所用的裝置。
發布商第一方 ID 預設為啟用,但您可以使用
導入以下程式碼:
#include "firebase/gma.h"
firebase::gma::SetIsSameAppKeyEnabled(/*is_enabled=*/false);
當機回報 (僅限 iOS)
Google Mobile Ads C++ SDK 會檢查 iOS 應用程式中發生的例外狀況,
系統就會記錄這些事件。這些例外情況是收集而來,
避免在日後的 SDK 版本中出現。
當機回報功能預設為啟用。如果您不想要與 SDK 相關的例外狀況
才能錄製,您可以呼叫
DisableSDKCrashReporting()
函式。呼叫此方法的最佳時機為
應用程式啟動後:
#include “firebase/gma.h”
firebase::gma::DisableSDKCrashReporting();
Android 裝置不支援當機回報功能。
Cookie 同意聲明
如果您的應用程式有特殊的 Android 需求,您可以設定選用
SharedPreferences
敬上
gad_has_consent_for_cookies
。詳情請參閱
Cookie 使用同意聲明
一節。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-10 (世界標準時間)。
[null,null,["上次更新時間:2024-09-10 (世界標準時間)。"],[[["The 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."],["Developers should consider using the iOS and Android SDKs from AdMob instead of the Google Mobile Ads C++ SDK."],["The SDK includes features like Publisher first-party ID (enabled by default) for personalized ads and crash reporting (iOS only, enabled by default)."],["Developers can control these features, including disabling Publisher first-party ID and crash reporting, using provided code snippets."],["For Android, specific consent requirements related to cookies can be addressed using SharedPreferences."]]],["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"]]