# Global Settings

> [!WARNING]
> **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.
>
> Instead of the Google Mobile Ads C++ SDK, consider using the
> [iOS](https://developers.google.com/admob/ios/quick-start) and
> [Android](https://developers.google.com/admob/android/quick-start) SDKs from AdMob.
> For support, reach out to the
> [contact us form](https://support.google.com/admob/contact/contact_us_gma_sdk).

<br />

The following global functions may be used to control certain information
collected by the Mobile Ads SDK.

## Publisher first-party ID, formerly known as same app key

The Google Mobile Ads C++ SDK uses Publisher first-party ID to help you
deliver more relevant and personalized ads by using data collected from the app
the user is using.

Publisher first-party ID is enabled by default, but you can disable it with the
following code prior to initialization:

    #include "firebase/gma.h"

    firebase::gma::SetIsSameAppKeyEnabled(/*is_enabled=*/false);

## Crash reporting (iOS Only)

The Google Mobile Ads C++ SDK inspects exceptions that occur in an iOS app and
records them if they are caused by the SDK. These exceptions are collected so we
can prevent them in future SDK versions.

Crash reporting is enabled by default. If you don't want SDK-related exceptions
to be recorded, you can disable this feature by calling the
`DisableSDKCrashReporting()` function. The best time to call this method is when
the app launches:

    #include "firebase/gma.h"

    firebase::gma::DisableSDKCrashReporting();

Crash reporting is not supported on Android devices.

## Consent for cookies

If your app has special requirements on Android, you can set the optional
[`SharedPreferences`](https://developer.android.com/reference/android/content/SharedPreferences)
`gad_has_consent_for_cookies`. See the
[Consent for cookies](https://developers.google.com/admob/android/global-settings#consent_for_cookies)
section of the Android Global Settings guide for more information.