---
title: Google AdMob
description: >-
  Create the AdMob app, copy the App ID, and set ad request options before you
  initialize.
---
> ## 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.

Create the AdMob app, copy each platform's App ID into this project, and set ad request options before you initialize the SDK.

<Steps>
  <Step title="Create the AdMob app">
    You need a [Google AdMob account](https://apps.admob.com). Under **Apps**, create or choose an Android app and an iOS app. Each platform has its own App ID.

    <Warning>
      A build without a valid App ID for this package crashes on start or fails to build.
    </Warning>

  </Step>
  <Step title="Copy the App ID">
    Under **App settings**, copy the App ID.

    <Image
      src="https://prismic-io.s3.amazonaws.com/invertase%2F52dd6900-108c-47a6-accb-699fde963b99_new+project+%2813%29.jpg"
      alt="AdMob App settings page with the App ID"
      caption="App ID on the AdMob App settings page."
      width={640}
    />

  </Step>
  <Step title="Add the App ID to the project">
    Put each App ID in one place. Do not also paste it into `Info.plist` or `AndroidManifest.xml`.

    - **Expo:** config plugin (`androidAppId` / `iosAppId`). See [Install with Expo](/installation/expo).
    - **React Native CLI:** root `app.json` snake_case (`android_app_id` / `ios_app_id`). See [Install with React Native CLI](/installation/react-native). Missing keys warn at build time and can crash the SDK on startup.

  </Step>
  <Step title="Configure outbound requests">
    <span id="configure-outbound-requests" />

    Call `setRequestConfiguration` before `mobileAds().initialize()` when the defaults are wrong for the app. A child-directed app must limit requests to suitable content before any ad loads.

    ```js
    import mobileAds, { MaxAdContentRating } from 'react-native-google-mobile-ads';

    mobileAds()
      .setRequestConfiguration({
        // Update all future requests suitable for parental guidance
        maxAdContentRating: MaxAdContentRating.PG,

        // Indicates that you want your content treated as child-directed for purposes of COPPA.
        tagForChildDirectedTreatment: true,

        // Indicates that you want the ad request to be handled in a
        // manner suitable for users under the age of consent.
        tagForUnderAgeOfConsent: true,

        // Hashed ids of physical test devices; emulators and simulators are automatic.
        // See /testing#register-a-test-device.
        testDeviceIdentifiers: ['YOUR-HASHED-TEST-DEVICE-ID'],
      })
      .then(() => {
        // Request config successfully set!
      });
    ```

    The fields are in the [`RequestConfiguration`](https://github.com/invertase/react-native-google-mobile-ads/blob/main/packages/core/src/types/RequestConfiguration.ts) source.

  </Step>
</Steps>
