---
title: Config plugin
description: >-
  Reference for the Expo config plugin options and the bare app.json
  equivalents.
---
> ## Documentation Index
> Fetch the complete documentation index at: https://react-native-google-mobile-ads.dev/llms.txt
> Use this file to discover all available pages before exploring further.

This page is the reference for every option supported by the Expo config plugin, alongside the equivalent bare
`app.json` keys under the `react-native-google-mobile-ads` block.

<Info>
  Setup context lives in the installation guides: [Install with Expo](/installation/expo) and
  [Install with React Native CLI](/installation/react-native). This page documents every key the
  plugin and bare `app.json` path accept, including options not covered there.
</Info>

## Options (Expo plugin ↔ bare `app.json`)

| Expo plugin (camelCase)        | Bare `app.json` (snake_case)      | Default      | Platforms    | Purpose                                                         |
| ------------------------------ | --------------------------------- | ------------ | ------------ | --------------------------------------------------------------- |
| `androidAppId`                 | `android_app_id`                  | — (required) | Android      | AdMob Android App ID.                                           |
| `iosAppId`                     | `ios_app_id`                      | — (required) | iOS          | AdMob iOS App ID.                                               |
| `androidSdk`                   | `android_sdk`                     | `classic`    | Android      | Android ads backend (`classic` \| `legacy` \| `nextgen`).       |
| `delayAppMeasurementInit`      | `delay_app_measurement_init`      | `false`      | Android, iOS | Delay app measurement until the SDK initializes or loads an ad. |
| `optimizeInitialization`       | `optimize_initialization`         | `true`       | Android      | Optimize SDK initialization.                                    |
| `optimizeAdLoading`            | `optimize_ad_loading`             | `true`       | Android      | Optimize ad loading.                                            |
| `skAdNetworkItems`             | `sk_ad_network_items`             | —            | iOS          | SKAdNetwork identifiers.                                        |
| `userTrackingUsageDescription` | `user_tracking_usage_description` | —            | iOS          | App Tracking Transparency usage description string.             |

There are no other plugin keys. Rebuild native code after changing any of these values.

## Where configuration lives

<Tabs groupId="framework" values={[{label: 'Expo', value: 'expo'}, {label: 'React Native', value: 'bare'}]}>
<TabItem value="expo">

Pass options as the second element of the plugin tuple in `app.json`, `app.config.js`, or `app.config.ts`:

```json
// <project-root>/app.json
{
  "expo": {
    "plugins": [
      [
        "react-native-google-mobile-ads",
        {
          "androidAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx",
          "iosAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
        }
      ]
    ]
  }
}
```

</TabItem>
<TabItem value="bare">

Put snake_case keys under the top-level `react-native-google-mobile-ads` object in the project-root
`app.json` (read at native build time by Android Gradle and the iOS config script):

```json
// <project-root>/app.json
{
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
  }
}
```

</TabItem>
</Tabs>

## App IDs

### `androidAppId` / `android_app_id`

Sets the AdMob Android App ID on
`com.google.android.gms.ads.APPLICATION_ID` in the Android manifest.

<Warning>
  Omitting this value causes a console warning from the Expo plugin (or a Gradle warning for bare
  apps). The native Google Mobile Ads SDK will crash on Android startup without a valid App ID.
</Warning>

See [Google AdMob](/configuration) for where to find the App ID in the AdMob console.

### `iosAppId` / `ios_app_id`

Sets `GADApplicationIdentifier` in the iOS `Info.plist`.

<Warning>
  Omitting this value causes a console warning from the Expo plugin (or an iOS config-script warning
  for bare apps). The native Google Mobile Ads SDK will crash on iOS without a valid App ID.
</Warning>

## Android SDK backend

### `androidSdk` / `android_sdk`

Selects which Google Mobile Ads Android SDK this library links at **native build time**. Accepted
values: `classic`, `legacy`, and `nextgen`.

| Value     | Effect                                                                                                   |
| --------- | -------------------------------------------------------------------------------------------------------- |
| `classic` | Classic `play-services-ads` backend (default when the key / Gradle property is omitted).                 |
| `legacy`  | Synonym for `classic`.                                                                                   |
| `nextgen` | [GMA Next-Gen SDK](https://developers.google.com/admob/android/next-gen/quick-start) (`ads-mobile-sdk`). |

The Expo config plugin writes the Gradle property `RNGMA_ANDROID_BACKEND` when `androidSdk` is set.
For bare React Native, precedence is:

1. Gradle project property `-PRNGMA_ANDROID_BACKEND=…`
2. `RNGMA_ANDROID_BACKEND` in `android/gradle.properties`
3. `android_sdk` in the `react-native-google-mobile-ads` block of `app.json`

When nothing is set, the library defaults to `classic`. Rebuild native Android after changing the
backend.

Why and when to switch, mediation and Google Ad Manager compatibility, requirements, and full Expo /
bare examples: [GMA Next-Gen SDK (Android)](/next-gen-sdk).

## App measurement delay

### `delayAppMeasurementInit` / `delay_app_measurement_init`

When `true`, delays Google Mobile Ads app measurement until the Mobile Ads SDK is initialized or an ad is
loaded. Default: `false`.

- **Android:** writes `com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT` in the manifest.
- **iOS:** writes `GADDelayAppMeasurementInit` in `Info.plist`.

Use this when you gather consent before ads — see
[Delaying app measurement](/european-user-consent#delaying-app-measurement).

## Android optimization flags

### `optimizeInitialization` / `optimize_initialization`

### `optimizeAdLoading` / `optimize_ad_loading`

Android-only flags that set Google's
[`OPTIMIZE_INITIALIZATION`](https://developers.google.com/admob/android/optimize-initialization)
and
[`OPTIMIZE_AD_LOADING`](https://developers.google.com/admob/android/optimize-initialization)
manifest meta-data. Both default to `true` (matching Google Mobile Ads SDK 24+ defaults).

These keys have no iOS equivalent. On Expo, the config plugin always writes both meta-data entries
(using the defaults when the keys are omitted). On bare React Native, the same defaults are applied
via Android manifest placeholders when the keys are omitted from `app.json`.

## SKAdNetwork (iOS)

### `skAdNetworkItems` / `sk_ad_network_items`

An array of [SKAdNetwork identifiers](https://developers.google.com/admob/ios/3p-skadnetworks)
merged into `SKAdNetworkItems` in `Info.plist`. Identifiers already present are left unchanged;
missing ones are appended. Keep this list up to date — Google's published list changes over time.

See the installation guides for a full example list:
[Expo](/installation/expo#enable-skadnetwork-to-track-conversions-ios) ·
[React Native CLI](/installation/react-native#enable-skadnetwork-to-track-conversions-ios).

## App Tracking Transparency (iOS)

### `userTrackingUsageDescription` / `user_tracking_usage_description`

Sets `NSUserTrackingUsageDescription` in `Info.plist` — the string shown in Apple's App Tracking
Transparency prompt. Request authorization at runtime as described in
[Consent & privacy basics](/consent-basics#requesting-app-tracking-transparency-authorization-ios).

```json
"userTrackingUsageDescription": "This identifier will be used to deliver personalized ads to you."
```

Bare equivalent:

```json
"user_tracking_usage_description": "This identifier will be used to deliver personalized ads to you."
```
