---
description: Capacitor AdMob plugin to monetize apps with banner, interstitial, rewarded, and app open ads on Android and iOS, including UMP consent management.
title: Capacitor AdMob Plugin for Android & iOS - Capawesome
image: https://capawesome.io/docs/assets/images/social/sdks/capacitor/admob.png
---

<!doctype html> 

[Skip to content ](#capacitor-admob-plugin) 

[📲 Introducing **Build Sharing** — get your builds onto testers' devices with a link & QR code. No account required. ](/blog/share-mobile-app-builds-with-testers/) 

* [ SDKs ](/docs/sdks/)
* [ iOS ](#ios)
* [ Configuration ](#configuration)
* [ Usage ](#usage)
* [ API ](#api)
* [ Type Aliases ](#type-aliases)
* [ Enums ](#enums)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ Breaking Changes ](#breaking-changes)
* [ License ](#license)
* [ Age Signals ](/docs/sdks/capacitor/age-signals/)
* [ Alarm ](/docs/sdks/capacitor/alarm/)
* [ Android Battery Optimization ](/docs/sdks/capacitor/android-battery-optimization/)
* [ Android Dark Mode Support ](/docs/sdks/capacitor/android-dark-mode-support/)
* [ Android Edge-to-Edge Support ](/docs/sdks/capacitor/android-edge-to-edge-support/)
* [ Android Foreground Service ](/docs/sdks/capacitor/android-foreground-service/)
* [ Android Intent Launcher ](/docs/sdks/capacitor/android-intent-launcher/)
* [ Android SMS Retriever ](/docs/sdks/capacitor/android-sms-retriever/)
* [ App Icon ](/docs/sdks/capacitor/app-icon/)
* [ App Integrity ](/docs/sdks/capacitor/app-integrity/)
* [ App Language ](/docs/sdks/capacitor/app-language/)
* [ App Launcher ](/docs/sdks/capacitor/app-launcher/)
* [ App Review ](/docs/sdks/capacitor/app-review/)
* [ App Shortcuts ](/docs/sdks/capacitor/app-shortcuts/)
* [ App Tracking Transparency ](/docs/sdks/capacitor/app-tracking-transparency/)
* [ App Update ](/docs/sdks/capacitor/app-update/)
* [ Apple Sign-In ](/docs/sdks/capacitor/apple-sign-in/)
* [ Asset Manager ](/docs/sdks/capacitor/asset-manager/)
* [ Audio Player ](/docs/sdks/capacitor/audio-player/)
* [ Audio Recorder ](/docs/sdks/capacitor/audio-recorder/)
* [ Audio Session ](/docs/sdks/capacitor/audio-session/)
* [ Background Geolocation ](/docs/sdks/capacitor/background-geolocation/)
* [ Background Task ](/docs/sdks/capacitor/background-task/)
* [ Badge ](/docs/sdks/capacitor/badge/)
* [ Barcode Scanner ](/docs/sdks/capacitor/barcode-scanner/)
* [ Barometer ](/docs/sdks/capacitor/barometer/)
* [ Battery ](/docs/sdks/capacitor/battery/)
* [ Biometrics ](/docs/sdks/capacitor/biometrics/)
* [ Bluetooth Low Energy ](/docs/sdks/capacitor/bluetooth-low-energy/)
* [ Calendar ](/docs/sdks/capacitor/calendar/)
* [ Clipboard ](/docs/sdks/capacitor/clipboard/)
* [ Cloudinary ](/docs/sdks/capacitor/cloudinary/)
* [ Compass ](/docs/sdks/capacitor/compass/)
* [ Contacts ](/docs/sdks/capacitor/contacts/)
* [ Crisp ](/docs/sdks/capacitor/crisp/)
* [ Datetime Picker ](/docs/sdks/capacitor/datetime-picker/)
* [ Device Info ](/docs/sdks/capacitor/device-info/)
* [ Dialog ](/docs/sdks/capacitor/dialog/)
* [ Document Scanner ](/docs/sdks/capacitor/document-scanner/)
* [ Electron ](/docs/sdks/capacitor/electron/)
* [ Exif ](/docs/sdks/capacitor/exif/)
* [ Facebook Sign-In ](/docs/sdks/capacitor/facebook-sign-in/)
* [ File Compressor ](/docs/sdks/capacitor/file-compressor/)
* [ File Manager ](/docs/sdks/capacitor/file-manager/)
* [ File Opener ](/docs/sdks/capacitor/file-opener/)
* [ File Picker ](/docs/sdks/capacitor/file-picker/)
* [ File Transfer ](/docs/sdks/capacitor/file-transfer/)
* [ Firebase ](/docs/sdks/capacitor/firebase/)
* [ Formbricks ](/docs/sdks/capacitor/formbricks/)
* [ Geocoder ](/docs/sdks/capacitor/geocoder/)
* [ Geofences ](/docs/sdks/capacitor/geofences/)
* [ Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [ Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [ Gyroscope ](/docs/sdks/capacitor/gyroscope/)
* [ Haptics ](/docs/sdks/capacitor/haptics/)
* [ Health ](/docs/sdks/capacitor/health/)
* [ Home Indicator ](/docs/sdks/capacitor/home-indicator/)
* [ In-App Browser ](/docs/sdks/capacitor/in-app-browser/)
* [ Install Referrer ](/docs/sdks/capacitor/install-referrer/)
* [ Intercom ](/docs/sdks/capacitor/intercom/)
* [ Intune ](/docs/sdks/capacitor/intune/)
* [ Keep Awake ](/docs/sdks/capacitor/keep-awake/)
* [ libSQL ](/docs/sdks/capacitor/libsql/)
* [ Light Sensor ](/docs/sdks/capacitor/light-sensor/)
* [ Live Update ](/docs/sdks/capacitor/live-update/)
* [ LLM ](/docs/sdks/capacitor/llm/)
* [ Localization ](/docs/sdks/capacitor/localization/)
* [ Mail Composer ](/docs/sdks/capacitor/mail-composer/)
* [ Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [ MapLibre ](/docs/sdks/capacitor/maplibre/)
* [ Maps Launcher ](/docs/sdks/capacitor/maps-launcher/)
* [ Media Session ](/docs/sdks/capacitor/media-session/)
* [ ML Kit ](/docs/sdks/capacitor/mlkit/)
* [ Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [ Network ](/docs/sdks/capacitor/network/)
* [ NFC ](/docs/sdks/capacitor/nfc/)
* [ Node.js ](/docs/sdks/capacitor/nodejs/)
* [ OAuth ](/docs/sdks/capacitor/oauth/)
* [ Passkeys ](/docs/sdks/capacitor/passkeys/)
* [ Password Autofill ](/docs/sdks/capacitor/password-autofill/)
* [ PDF Generator ](/docs/sdks/capacitor/pdf-generator/)
* [ PDF Viewer ](/docs/sdks/capacitor/pdf-viewer/)
* [ Pedometer ](/docs/sdks/capacitor/pedometer/)
* [ Permissions ](/docs/sdks/capacitor/permissions/)
* [ Phone Dialer ](/docs/sdks/capacitor/phone-dialer/)
* [ Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [ Photo Manipulator ](/docs/sdks/capacitor/photo-manipulator/)
* [ PixLive ](/docs/sdks/capacitor/pixlive/)
* [ PostHog ](/docs/sdks/capacitor/posthog/)
* [ Printer ](/docs/sdks/capacitor/printer/)
* [ Privacy Screen ](/docs/sdks/capacitor/privacy-screen/)
* [ Proximity Sensor ](/docs/sdks/capacitor/proximity-sensor/)
* [ Purchases ](/docs/sdks/capacitor/purchases/)
* [ RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [ Root Detection ](/docs/sdks/capacitor/root-detection/)
* [ Screen Brightness ](/docs/sdks/capacitor/screen-brightness/)
* [ Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [ Screen Reader ](/docs/sdks/capacitor/screen-reader/)
* [ Screenshot ](/docs/sdks/capacitor/screenshot/)
* [ Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [ Settings Launcher ](/docs/sdks/capacitor/settings-launcher/)
* [ Shake ](/docs/sdks/capacitor/shake/)
* [ Silent Mode ](/docs/sdks/capacitor/silent-mode/)
* [ SIM ](/docs/sdks/capacitor/sim/)
* [ SMS Composer ](/docs/sdks/capacitor/sms-composer/)
* [ Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [ Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [ Share Target ](/docs/sdks/capacitor/share-target/)
* [ Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [ SQLite ](/docs/sdks/capacitor/sqlite/)
* [ Superwall ](/docs/sdks/capacitor/superwall/)
* [ System WebView ](/docs/sdks/capacitor/system-webview/)
* [ Tauri ](/docs/sdks/capacitor/tauri/)
* [ Text Interaction ](/docs/sdks/capacitor/text-interaction/)
* [ Text Zoom ](/docs/sdks/capacitor/text-zoom/)
* [ Thermal State ](/docs/sdks/capacitor/thermal-state/)
* [ Toast ](/docs/sdks/capacitor/toast/)
* [ Torch ](/docs/sdks/capacitor/torch/)
* [ Vault ](/docs/sdks/capacitor/vault/)
* [ Volume ](/docs/sdks/capacitor/volume/)
* [ Wallet ](/docs/sdks/capacitor/wallet/)
* [ Watch ](/docs/sdks/capacitor/watch/)
* [ Wifi ](/docs/sdks/capacitor/wifi/)
* [ YouTube Player ](/docs/sdks/capacitor/youtube-player/)
* [ Zip ](/docs/sdks/capacitor/zip/)
* [ Cordova ](/docs/sdks/cordova/)
* [ Cloud ](/docs/cloud/)
* [ Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [ Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [ FAQ ](/docs/cloud/live-updates/faq/)
* [ Native Builds ](/docs/cloud/native-builds/)
* [ Set Up Environments ](/docs/cloud/native-builds/environments/)
* [ Set Up Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [ Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [ Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [ Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [ Use pnpm, Yarn, or bun ](/docs/cloud/native-builds/package-managers/)
* [ Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [ Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [ Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [ Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [ Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [ Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [ Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [ FAQ ](/docs/cloud/native-builds/faq/)
* [ App Store Publishing ](/docs/cloud/app-store-publishing/)
* [ Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [ Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [ Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [ FAQ ](/docs/cloud/app-store-publishing/faq/)
* [ Automations ](/docs/cloud/automations/)
* [ Reference ](/docs/cloud/automations/reference/)
* [ Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [ FAQ ](/docs/cloud/automations/faq/)
* [ Assist ](/docs/cloud/assist/)
* [ CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [ Webhooks ](/docs/cloud/webhooks/)
* [ Integrations ](/docs/cloud/integrations/)
* Notifications
* Account
* [ Organization ](/docs/cloud/organizations/)
* [ Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [ Network Restrictions ](/docs/cloud/organizations/network-restrictions/)
* [ Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [ Billing ](/docs/cloud/organizations/billing/)
* [ License Keys ](/docs/cloud/license-keys/)
* [ AI ](/docs/ai/)
* [ Insiders ](/docs/insiders/)
* [ Billing & Plans ](/docs/insiders/billing-and-plans/)
* [ FAQ ](/docs/insiders/faq/)
* [ License ](https://capawesome.io/legal/eula/)
* [ Support ](/docs/support/)
* [ Contributing ](/docs/contributing/)
* Contributing code
* [ Code of Conduct ](/docs/contributing/code-of-conduct/)
* [ Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [ Blog ](/blog/)
* Categories

* [ iOS ](#ios)
* [ Configuration ](#configuration)
* [ Usage ](#usage)
* [ API ](#api)
* [ Type Aliases ](#type-aliases)
* [ Enums ](#enums)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ Breaking Changes ](#breaking-changes)
* [ License ](#license)

Build and Ship Mobile Apps Faster

Cloud builds, OTA live updates, and automated store releases — everything your mobile team needs in one platform.

[Start for free ](https://console.cloud.capawesome.io/?utm%5Fsource=docs&utm%5Fmedium=sidebar%5Fcta&utm%5Fcampaign=docs%5Fcta) [See our plans ](https://capawesome.io/pricing/?utm%5Fsource=docs&utm%5Fmedium=sidebar%5Fcta&utm%5Fcampaign=docs%5Fcta) 

# Capacitor AdMob Plugin[¶](#capacitor-admob-plugin "Permanent link")

Capacitor plugin for monetizing your app with Google AdMob ads on Android and iOS. Built on the Android Next-Gen Google Mobile Ads SDK with banner, interstitial, rewarded, rewarded interstitial and app open ads, ad revenue events, and the canonical User Messaging Platform (UMP) consent flow.

⚠️ **Experimental:** This plugin could not be tested extensively yet. Use it with caution in production and [report any issues](https://github.com/capawesome-team/capacitor-plugins/issues) you encounter.

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Features[¶](#features "Permanent link")

The Capacitor AdMob plugin is the most complete way to serve Google AdMob ads in a Capacitor app. Here are some of the key features:

* 🚀 **Next-Gen SDK**: Built on the Android Next-Gen Google Mobile Ads SDK and the latest iOS SDK from day one.
* 🖼️ **Banner Ads**: Anchored adaptive, inline adaptive, fixed sizes, and collapsible banners.
* 📐 **Banner Layout Done Right**: Overlay and resize modes with correct edge-to-edge insets, plus inline placement at a frame you measure in CSS pixels.
* 🎬 **Full-Screen Ads**: Interstitial, rewarded, rewarded interstitial, and app open ads with a uniform load/show API.
* 🔁 **App Open Automation**: Automatically load and show app open ads when the app returns to the foreground, with a frequency cap.
* 💰 **Revenue Events**: Receive the paid event of every ad format for your LTV and analytics pipelines.
* 🛡️ **Consent Management**: Canonical User Messaging Platform (UMP) flow with a single method call, privacy options form, and debug geography testing.
* 🔢 **Multiple Instances**: Load and show multiple typed ad instances at the same time, each with its own identifier.
* 🚨 **Typed Errors**: Every rejection carries a typed error code plus the underlying Google Mobile Ads SDK error message.
* 🧪 **Test Device Support**: Register test devices for ads and consent forms.
* 🤝 **Compatibility**: Works hand in hand with the [App Tracking Transparency](https://capawesome.io/docs/sdks/capacitor/app-tracking-transparency/) and [Purchases](https://capawesome.io/docs/sdks/capacitor/purchases/) plugins.
* 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.
* 🔁 **Up-to-date**: Always supports the latest Capacitor version.
* ⭐️ **Support**: Priority support from the Capawesome Team.
* ✨ **Handcrafted**: Built from the ground up with care and expertise, not forked or AI-generated.

Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!

## Use Cases[¶](#use-cases "Permanent link")

The AdMob plugin is typically used to monetize free apps, for example:

* **Banner ads**: Display a persistent banner at the top or bottom of your app, or inline within scrolling content.
* **Interstitial ads**: Show a full-screen ad at natural transition points, such as between levels of a game.
* **Rewarded ads**: Grant users in-app rewards, such as coins or extra lives, for watching an ad.
* **App open ads**: Show an ad when users bring your app back to the foreground.

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 0.x.x          | \>=8.x.x          | Active support |

## Installation[¶](#installation "Permanent link")

This plugin is only available to [Capawesome Insiders](https://capawesome.io/insiders/). First, make sure you have the Capawesome npm registry set up. You can do this by running the following commands:

`[](#%5F%5Fcodelineno-0-1)npm config set @capawesome-team:registry https://npm.registry.capawesome.io
[](#%5F%5Fcodelineno-0-2)npm config set //npm.registry.capawesome.io/:_authToken <YOUR_LICENSE_KEY>
`

**Attention**: Replace `<YOUR_LICENSE_KEY>` with the license key you received from Polar. If you don't have a license key yet, you can get one by becoming a [Capawesome Insider](https://capawesome.io/insiders/).

Next, you can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-1-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-2-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome-team/capacitor-admob` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-3-1)npm install @capawesome-team/capacitor-admob
[](#%5F%5Fcodelineno-3-2)npx cap sync
`

### Android[¶](#android "Permanent link")

#### AdMob App ID[¶](#admob-app-id "Permanent link")

Add your [AdMob app ID](https://support.google.com/admob/answer/7356431) as a `meta-data` element to the `application` element of your `AndroidManifest.xml` file:

`[](#%5F%5Fcodelineno-4-1)<meta-data
[](#%5F%5Fcodelineno-4-2)    android:name="com.google.android.gms.ads.APPLICATION_ID"
[](#%5F%5Fcodelineno-4-3)    android:value="ca-app-pub-3940256099942544~3347511713" />
`

**Attention**: The value above is Google's official public **test** app ID. Replace it with your own AdMob app ID before releasing your app. If the `meta-data` element is missing, `initialize(...)` rejects with a clear error message.

#### Proguard[¶](#proguard "Permanent link")

If you are using Proguard, you need to add the following rules to your `proguard-rules.pro` file:

`[](#%5F%5Fcodelineno-5-1)-keep class io.capawesome.capacitorjs.plugins.** { *; }
`

#### Variables[¶](#variables "Permanent link")

If needed, you can define the following project variables in your app’s `variables.gradle` file to change the default version of the dependencies:

* `$adsMobileSdkVersion` version of `com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk` (default: `1.2.1`)
* `$userMessagingPlatformVersion` version of `com.google.android.ump:user-messaging-platform` (default: `3.2.0`)

This can be useful if you encounter dependency conflicts with other plugins in your project.

The plugin uses the **Next-Gen** Google Mobile Ads SDK for Android, which is fetched from Google's Maven repository by your app — it is not bundled with the plugin.

### iOS[¶](#ios "Permanent link")

#### AdMob App ID[¶](#admob-app-id%5F1 "Permanent link")

Add the `GADApplicationIdentifier` key with your [AdMob app ID](https://support.google.com/admob/answer/7356431) as value to the `Info.plist` file of your app:

`[](#%5F%5Fcodelineno-6-1)<key>GADApplicationIdentifier</key>
[](#%5F%5Fcodelineno-6-2)<string>ca-app-pub-3940256099942544~1458002511</string>
`

**Attention**: The value above is Google's official public **test** app ID. Replace it with your own AdMob app ID before releasing your app. If the key is missing, `initialize(...)` rejects with a clear error message.

#### SKAdNetwork[¶](#skadnetwork "Permanent link")

Add the [SKAdNetwork identifiers](https://developers.google.com/admob/ios/quick-start#update%5Fyour%5Finfoplist) recommended by Google to the `Info.plist` file of your app so that ad attribution works correctly:

`[](#%5F%5Fcodelineno-7-1)<key>SKAdNetworkItems</key>
[](#%5F%5Fcodelineno-7-2)<array>
[](#%5F%5Fcodelineno-7-3)  <dict>
[](#%5F%5Fcodelineno-7-4)    <key>SKAdNetworkIdentifier</key>
[](#%5F%5Fcodelineno-7-5)    <string>cstr6suwn9.skadnetwork</string>
[](#%5F%5Fcodelineno-7-6)  </dict>
[](#%5F%5Fcodelineno-7-7)</array>
`

**Attention**: The list above only contains Google's own identifier. Google recommends adding the complete list of identifiers from the [official documentation](https://developers.google.com/admob/ios/quick-start#update%5Fyour%5Finfoplist), which also covers third-party buyers.

#### App Tracking Transparency[¶](#app-tracking-transparency "Permanent link")

If you want to serve personalized ads, you must request the user's permission to track them across apps and websites. Use the [App Tracking Transparency](https://capawesome.io/docs/sdks/capacitor/app-tracking-transparency/) plugin for this and follow Google's recommended order:

1. Call `requestConsent(...)` (see [Usage](#gather-consent-and-initialize-the-sdk)). The UMP consent form includes the App Tracking Transparency context on iOS.
2. Request the tracking permission with the App Tracking Transparency plugin **before** initializing the Google Mobile Ads SDK.
3. Call `initialize(...)`.

This order is important to avoid App Store rejections.

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Usage[¶](#usage "Permanent link")

The following examples show how to gather the user's consent, initialize the SDK, show banner, interstitial, rewarded and app open ads, track ad revenue, and test your integration.

### Gather consent and initialize the SDK[¶](#gather-consent-and-initialize-the-sdk "Permanent link")

Google requires that you gather the user's consent with the User Messaging Platform (UMP) before requesting ads if the user is located in the European Economic Area (EEA), the UK, or a regulated US state. Set up your consent message in the [AdMob console](https://support.google.com/admob/answer/10113207) under **Privacy & messaging** first.

The plugin implements the canonical UMP flow in a single method call. Call `requestConsent(...)` on **every app launch** before initializing the Google Mobile Ads SDK. It requests the latest consent information and shows the consent form if consent is required:

`[](#%5F%5Fcodelineno-8-1)import { Admob } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-8-2)
[](#%5F%5Fcodelineno-8-3)const setupAds = async () => {
[](#%5F%5Fcodelineno-8-4)  // 1. Gather consent (shows the consent form only if required)
[](#%5F%5Fcodelineno-8-5)  const { canRequestAds, privacyOptionsRequired } = await Admob.requestConsent();
[](#%5F%5Fcodelineno-8-6)  // 2. Initialize the Google Mobile Ads SDK
[](#%5F%5Fcodelineno-8-7)  if (canRequestAds) {
[](#%5F%5Fcodelineno-8-8)    await Admob.initialize();
[](#%5F%5Fcodelineno-8-9)  }
[](#%5F%5Fcodelineno-8-10)  return privacyOptionsRequired;
[](#%5F%5Fcodelineno-8-11)};
`

If `privacyOptionsRequired` is `true`, you must offer the user a way to change their consent settings, for example from a privacy settings page:

`[](#%5F%5Fcodelineno-9-1)const showPrivacyOptions = async () => {
[](#%5F%5Fcodelineno-9-2)  await Admob.showPrivacyOptionsForm();
[](#%5F%5Fcodelineno-9-3)};
`

**Note**: The load methods of the plugin reject with the `CONSENT_NOT_GATHERED` error code if ads cannot be requested yet. This prevents ad requests that violate Google's EU User Consent Policy.

### Show a banner ad[¶](#show-a-banner-ad "Permanent link")

The plugin supports three ways to place a banner ad. Choose the one that fits your layout:

| Mode                           | Description                                                                                              | When to use                                                                   |
| ------------------------------ | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| mode: 'overlay' (default)      | The banner ad is displayed on top of the web view, anchored to the top or bottom edge (safe-area aware). | Your layout already reserves space for the banner (e.g. with a fixed footer). |
| mode: 'resize'                 | The web view is resized so that the banner ad never overlaps your web content.                           | You want the banner to never cover any content without changing your CSS.     |
| frame: { x, y, width, height } | The banner ad is placed at a frame you measure in CSS pixels, e.g. with getBoundingClientRect().         | Inline placement within your content, e.g. between list items.                |

Load and show a banner ad with `showBanner(...)`. Use the returned identifier to hide, resume, or remove the banner ad later:

`[](#%5F%5Fcodelineno-10-1)import { Admob, BannerSize } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-10-2)
[](#%5F%5Fcodelineno-10-3)const showBanner = async () => {
[](#%5F%5Fcodelineno-10-4)  const { id } = await Admob.showBanner({
[](#%5F%5Fcodelineno-10-5)    adUnitId: 'ca-app-pub-3940256099942544/6300978111', // Test ad unit ID
[](#%5F%5Fcodelineno-10-6)    size: BannerSize.AdaptiveBanner,
[](#%5F%5Fcodelineno-10-7)    position: 'bottom',
[](#%5F%5Fcodelineno-10-8)  });
[](#%5F%5Fcodelineno-10-9)  return id;
[](#%5F%5Fcodelineno-10-10)};
`

For inline placement, measure the anchor element and update the frame on layout changes:

`[](#%5F%5Fcodelineno-11-1)import { Admob, BannerSize } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-11-2)
[](#%5F%5Fcodelineno-11-3)const showInlineBanner = async () => {
[](#%5F%5Fcodelineno-11-4)  const rect = document.querySelector('#banner-anchor').getBoundingClientRect();
[](#%5F%5Fcodelineno-11-5)  const { id } = await Admob.showBanner({
[](#%5F%5Fcodelineno-11-6)    adUnitId: 'ca-app-pub-3940256099942544/6300978111', // Test ad unit ID
[](#%5F%5Fcodelineno-11-7)    size: BannerSize.InlineAdaptiveBanner,
[](#%5F%5Fcodelineno-11-8)    frame: { x: rect.x, y: rect.y, width: rect.width, height: rect.height },
[](#%5F%5Fcodelineno-11-9)  });
[](#%5F%5Fcodelineno-11-10)  // Update the frame when the layout changes (e.g. on scroll or resize)
[](#%5F%5Fcodelineno-11-11)  window.addEventListener('resize', async () => {
[](#%5F%5Fcodelineno-11-12)    const newRect = document.querySelector('#banner-anchor').getBoundingClientRect();
[](#%5F%5Fcodelineno-11-13)    await Admob.setBannerFrame({
[](#%5F%5Fcodelineno-11-14)      id,
[](#%5F%5Fcodelineno-11-15)      frame: { x: newRect.x, y: newRect.y, width: newRect.width, height: newRect.height },
[](#%5F%5Fcodelineno-11-16)    });
[](#%5F%5Fcodelineno-11-17)  });
[](#%5F%5Fcodelineno-11-18)};
`

### Show an interstitial ad[¶](#show-an-interstitial-ad "Permanent link")

Load an interstitial ad in advance and show it at a natural transition point, for example between two levels of a game:

`[](#%5F%5Fcodelineno-12-1)import { Admob } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-12-2)
[](#%5F%5Fcodelineno-12-3)const showInterstitialAd = async () => {
[](#%5F%5Fcodelineno-12-4)  const { id } = await Admob.loadInterstitialAd({
[](#%5F%5Fcodelineno-12-5)    adUnitId: 'ca-app-pub-3940256099942544/1033173712', // Test ad unit ID
[](#%5F%5Fcodelineno-12-6)  });
[](#%5F%5Fcodelineno-12-7)  await Admob.showInterstitialAd({ id });
[](#%5F%5Fcodelineno-12-8)};
`

### Show a rewarded ad[¶](#show-a-rewarded-ad "Permanent link")

Listen for the `rewardEarned` event to grant the reward, then load and show the rewarded ad. Rewarded interstitial ads work the same way with `loadRewardedInterstitialAd(...)` and `showRewardedInterstitialAd(...)`:

`` [](#%5F%5Fcodelineno-13-1)import { Admob } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-13-2)
[](#%5F%5Fcodelineno-13-3)const showRewardedAd = async () => {
[](#%5F%5Fcodelineno-13-4)  await Admob.addListener('rewardEarned', event => {
[](#%5F%5Fcodelineno-13-5)    console.log(`User earned ${event.amount} ${event.type}`);
[](#%5F%5Fcodelineno-13-6)  });
[](#%5F%5Fcodelineno-13-7)  const { id } = await Admob.loadRewardedAd({
[](#%5F%5Fcodelineno-13-8)    adUnitId: 'ca-app-pub-3940256099942544/5224354917', // Test ad unit ID
[](#%5F%5Fcodelineno-13-9)  });
[](#%5F%5Fcodelineno-13-10)  await Admob.showRewardedAd({ id });
[](#%5F%5Fcodelineno-13-11)};
 ``

### Show an app open ad[¶](#show-an-app-open-ad "Permanent link")

App open ads are shown when users bring your app back to the foreground. You can load and show them manually with `loadAppOpenAd(...)` and `showAppOpenAd(...)`, or let the plugin handle the entire lifecycle:

`[](#%5F%5Fcodelineno-14-1)import { Admob } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-14-2)
[](#%5F%5Fcodelineno-14-3)const enableAppOpenAds = async () => {
[](#%5F%5Fcodelineno-14-4)  await Admob.enableAppOpenAutoShow({
[](#%5F%5Fcodelineno-14-5)    adUnitId: 'ca-app-pub-3940256099942544/9257395921', // Test ad unit ID
[](#%5F%5Fcodelineno-14-6)    minInterval: 14400, // Show at most one ad every 4 hours
[](#%5F%5Fcodelineno-14-7)  });
[](#%5F%5Fcodelineno-14-8)};
`

The plugin automatically loads and shows an app open ad every time the app returns to the foreground, honoring the frequency cap. The ad is never shown while a consent form or another full-screen ad is visible.

### Track ad revenue[¶](#track-ad-revenue "Permanent link")

Listen for the `adRevenuePaid` event to receive the revenue of every ad format, for example for your lifetime value (LTV) and analytics pipelines:

`` [](#%5F%5Fcodelineno-15-1)import { Admob } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-15-2)
[](#%5F%5Fcodelineno-15-3)const trackAdRevenue = async () => {
[](#%5F%5Fcodelineno-15-4)  await Admob.addListener('adRevenuePaid', event => {
[](#%5F%5Fcodelineno-15-5)    console.log(`Ad revenue: ${event.value} ${event.currencyCode} (${event.precision})`);
[](#%5F%5Fcodelineno-15-6)  });
[](#%5F%5Fcodelineno-15-7)};
 ``

### Test your integration[¶](#test-your-integration "Permanent link")

Always use Google's official public test ad units during development. Using your own ad units during development can lead to your AdMob account being suspended.

| Format                | Android                                | iOS                                    |
| --------------------- | -------------------------------------- | -------------------------------------- |
| Banner                | ca-app-pub-3940256099942544/6300978111 | ca-app-pub-3940256099942544/2934735716 |
| Interstitial          | ca-app-pub-3940256099942544/1033173712 | ca-app-pub-3940256099942544/4411468910 |
| Rewarded              | ca-app-pub-3940256099942544/5224354917 | ca-app-pub-3940256099942544/1712485313 |
| Rewarded Interstitial | ca-app-pub-3940256099942544/5354046379 | ca-app-pub-3940256099942544/6978759866 |
| App Open              | ca-app-pub-3940256099942544/9257395921 | ca-app-pub-3940256099942544/5575463023 |

You can also register your own devices as test devices with the `testDeviceIds` option of `initialize(...)`.

To test the consent flow, use the `debugGeography` and `testDeviceIds` options of `requestConsent(...)` and reset the consent state with `resetConsent()`:

`[](#%5F%5Fcodelineno-16-1)import { Admob, DebugGeography } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-16-2)
[](#%5F%5Fcodelineno-16-3)const testConsent = async () => {
[](#%5F%5Fcodelineno-16-4)  await Admob.resetConsent();
[](#%5F%5Fcodelineno-16-5)  await Admob.requestConsent({
[](#%5F%5Fcodelineno-16-6)    debugGeography: DebugGeography.Eea,
[](#%5F%5Fcodelineno-16-7)    testDeviceIds: ['YOUR_TEST_DEVICE_ID'],
[](#%5F%5Fcodelineno-16-8)  });
[](#%5F%5Fcodelineno-16-9)};
`

### Handle errors[¶](#handle-errors "Permanent link")

Every rejection that the plugin can recover from carries a typed error code in `error.code`. Use the `ErrorCode` enum to branch on it:

`[](#%5F%5Fcodelineno-17-1)import { Admob, ErrorCode } from '@capawesome-team/capacitor-admob';
[](#%5F%5Fcodelineno-17-2)
[](#%5F%5Fcodelineno-17-3)const loadInterstitialAd = async () => {
[](#%5F%5Fcodelineno-17-4)  try {
[](#%5F%5Fcodelineno-17-5)    return await Admob.loadInterstitialAd({
[](#%5F%5Fcodelineno-17-6)      adUnitId: 'ca-app-pub-3940256099942544/1033173712', // Test ad unit ID
[](#%5F%5Fcodelineno-17-7)    });
[](#%5F%5Fcodelineno-17-8)  } catch (error) {
[](#%5F%5Fcodelineno-17-9)    if (error.code === ErrorCode.ConsentNotGathered) {
[](#%5F%5Fcodelineno-17-10)      console.log('Gather the consent with requestConsent() first.');
[](#%5F%5Fcodelineno-17-11)    } else if (error.code === ErrorCode.NotInitialized) {
[](#%5F%5Fcodelineno-17-12)      console.log('Initialize the SDK with initialize() first.');
[](#%5F%5Fcodelineno-17-13)    } else if (error.code === ErrorCode.LoadFailed) {
[](#%5F%5Fcodelineno-17-14)      console.log('No ad was available:', error.message);
[](#%5F%5Fcodelineno-17-15)    }
[](#%5F%5Fcodelineno-17-16)    return undefined;
[](#%5F%5Fcodelineno-17-17)  }
[](#%5F%5Fcodelineno-17-18)};
`

The plugin uses the following error codes:

| Code                       | Description                                                              |
| -------------------------- | ------------------------------------------------------------------------ |
| AD\_ALREADY\_SHOWING       | The ad is already showing.                                               |
| AD\_NOT\_LOADED            | No loaded ad was found for the given identifier.                         |
| APPLICATION\_ID\_MISSING   | The AdMob application ID is missing in the native project configuration. |
| CONSENT\_FORM\_UNAVAILABLE | The consent form is not available.                                       |
| CONSENT\_NOT\_GATHERED     | Ads cannot be requested because the consent has not been gathered yet.   |
| CONSENT\_REQUEST\_FAILED   | The consent information could not be requested.                          |
| LOAD\_FAILED               | The ad could not be loaded.                                              |
| NOT\_INITIALIZED           | The Google Mobile Ads SDK has not been initialized.                      |

**Note**: The `errorCode` property of the `adFailedToLoad` and `adFailedToShow` events is not an `ErrorCode`. It is the numeric error code reported by the Google Mobile Ads SDK (see [Android](https://developers.google.com/admob/android/reference/com/google/android/gms/ads/AdRequest#constant-summary) and [iOS](https://developers.google.com/admob/ios/reference/enum/GADErrorCode)).

## API[¶](#api "Permanent link")

* [disableAppOpenAutoShow()](#disableappopenautoshow)
* [enableAppOpenAutoShow(...)](#enableappopenautoshow)
* [hideBanner(...)](#hidebanner)
* [initialize(...)](#initialize)
* [loadAppOpenAd(...)](#loadappopenad)
* [loadInterstitialAd(...)](#loadinterstitialad)
* [loadRewardedAd(...)](#loadrewardedad)
* [loadRewardedInterstitialAd(...)](#loadrewardedinterstitialad)
* [removeBanner(...)](#removebanner)
* [requestConsent(...)](#requestconsent)
* [resetConsent()](#resetconsent)
* [resumeBanner(...)](#resumebanner)
* [setApplicationMuted(...)](#setapplicationmuted)
* [setApplicationVolume(...)](#setapplicationvolume)
* [setBannerFrame(...)](#setbannerframe)
* [showAppOpenAd(...)](#showappopenad)
* [showBanner(...)](#showbanner)
* [showInterstitialAd(...)](#showinterstitialad)
* [showPrivacyOptionsForm()](#showprivacyoptionsform)
* [showRewardedAd(...)](#showrewardedad)
* [showRewardedInterstitialAd(...)](#showrewardedinterstitialad)
* [addListener('adClicked', ...)](#addlisteneradclicked-)
* [addListener('adDismissed', ...)](#addlisteneraddismissed-)
* [addListener('adFailedToLoad', ...)](#addlisteneradfailedtoload-)
* [addListener('adFailedToShow', ...)](#addlisteneradfailedtoshow-)
* [addListener('adImpressionRecorded', ...)](#addlisteneradimpressionrecorded-)
* [addListener('adLoaded', ...)](#addlisteneradloaded-)
* [addListener('adRevenuePaid', ...)](#addlisteneradrevenuepaid-)
* [addListener('adShowed', ...)](#addlisteneradshowed-)
* [addListener('bannerSizeChanged', ...)](#addlistenerbannersizechanged-)
* [addListener('rewardEarned', ...)](#addlistenerrewardearned-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

### disableAppOpenAutoShow()[¶](#disableappopenautoshow "Permanent link")

`[](#%5F%5Fcodelineno-18-1)disableAppOpenAutoShow() => Promise<void>
`

Disable the automatic loading and showing of app open ads.

Only available on Android and iOS.

**Since:** 0.0.1

---

### enableAppOpenAutoShow(...)[¶](#enableappopenautoshow "Permanent link")

`[](#%5F%5Fcodelineno-19-1)enableAppOpenAutoShow(options: EnableAppOpenAutoShowOptions) => Promise<void>
`

Enable the automatic loading and showing of app open ads when the app is brought back to the foreground.

The ad is never shown while a consent form is visible.

Only available on Android and iOS.

| Param       | Type                                                          |
| ----------- | ------------------------------------------------------------- |
| **options** | [EnableAppOpenAutoShowOptions](#enableappopenautoshowoptions) |

**Since:** 0.0.1

---

### hideBanner(...)[¶](#hidebanner "Permanent link")

`[](#%5F%5Fcodelineno-20-1)hideBanner(options: HideBannerOptions) => Promise<void>
`

Hide a banner ad without destroying it.

Use `resumeBanner(...)` to show it again.

Only available on Android and iOS.

| Param       | Type                                    |
| ----------- | --------------------------------------- |
| **options** | [HideBannerOptions](#hidebanneroptions) |

**Since:** 0.0.1

---

### initialize(...)[¶](#initialize "Permanent link")

`[](#%5F%5Fcodelineno-21-1)initialize(options?: InitializeOptions | undefined) => Promise<void>
`

Initialize the Google Mobile Ads SDK.

Must be called once before loading any ads, after the consent has been gathered with `requestConsent(...)`.

Only available on Android and iOS.

| Param       | Type                                    |
| ----------- | --------------------------------------- |
| **options** | [InitializeOptions](#initializeoptions) |

**Since:** 0.0.1

---

### loadAppOpenAd(...)[¶](#loadappopenad "Permanent link")

`[](#%5F%5Fcodelineno-22-1)loadAppOpenAd(options: LoadAppOpenAdOptions) => Promise<LoadAppOpenAdResult>
`

Load an app open ad.

Only available on Android and iOS.

| Param       | Type                                          |
| ----------- | --------------------------------------------- |
| **options** | [LoadAppOpenAdOptions](#loadappopenadoptions) |

**Returns:** `Promise<[LoadAppOpenAdResult](#loadappopenadresult)>`

**Since:** 0.0.1

---

### loadInterstitialAd(...)[¶](#loadinterstitialad "Permanent link")

`[](#%5F%5Fcodelineno-23-1)loadInterstitialAd(options: LoadInterstitialAdOptions) => Promise<LoadInterstitialAdResult>
`

Load an interstitial ad.

Only available on Android and iOS.

| Param       | Type                                                    |
| ----------- | ------------------------------------------------------- |
| **options** | [LoadInterstitialAdOptions](#loadinterstitialadoptions) |

**Returns:** `Promise<[LoadInterstitialAdResult](#loadinterstitialadresult)>`

**Since:** 0.0.1

---

### loadRewardedAd(...)[¶](#loadrewardedad "Permanent link")

`[](#%5F%5Fcodelineno-24-1)loadRewardedAd(options: LoadRewardedAdOptions) => Promise<LoadRewardedAdResult>
`

Load a rewarded ad.

Only available on Android and iOS.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [LoadRewardedAdOptions](#loadrewardedadoptions) |

**Returns:** `Promise<[LoadRewardedAdResult](#loadrewardedadresult)>`

**Since:** 0.0.1

---

### loadRewardedInterstitialAd(...)[¶](#loadrewardedinterstitialad "Permanent link")

`[](#%5F%5Fcodelineno-25-1)loadRewardedInterstitialAd(options: LoadRewardedInterstitialAdOptions) => Promise<LoadRewardedInterstitialAdResult>
`

Load a rewarded interstitial ad.

Only available on Android and iOS.

| Param       | Type                                                                    |
| ----------- | ----------------------------------------------------------------------- |
| **options** | [LoadRewardedInterstitialAdOptions](#loadrewardedinterstitialadoptions) |

**Returns:** `Promise<[LoadRewardedInterstitialAdResult](#loadrewardedinterstitialadresult)>`

**Since:** 0.0.1

---

### removeBanner(...)[¶](#removebanner "Permanent link")

`[](#%5F%5Fcodelineno-26-1)removeBanner(options: RemoveBannerOptions) => Promise<void>
`

Remove and destroy a banner ad.

Only available on Android and iOS.

| Param       | Type                                        |
| ----------- | ------------------------------------------- |
| **options** | [RemoveBannerOptions](#removebanneroptions) |

**Since:** 0.0.1

---

### requestConsent(...)[¶](#requestconsent "Permanent link")

`[](#%5F%5Fcodelineno-27-1)requestConsent(options?: RequestConsentOptions | undefined) => Promise<RequestConsentResult>
`

Request the latest consent information from the User Messaging Platform (UMP) and show the consent form if consent is required.

Call this method on every app launch before initializing the Google Mobile Ads SDK.

Only available on Android and iOS.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [RequestConsentOptions](#requestconsentoptions) |

**Returns:** `Promise<[RequestConsentResult](#requestconsentresult)>`

**Since:** 0.0.1

---

### resetConsent()[¶](#resetconsent "Permanent link")

`[](#%5F%5Fcodelineno-28-1)resetConsent() => Promise<void>
`

Reset the consent state of the User Messaging Platform (UMP).

This method should only be used for testing purposes.

Only available on Android and iOS.

**Since:** 0.0.1

---

### resumeBanner(...)[¶](#resumebanner "Permanent link")

`[](#%5F%5Fcodelineno-29-1)resumeBanner(options: ResumeBannerOptions) => Promise<void>
`

Show a hidden banner ad again.

Only available on Android and iOS.

| Param       | Type                                        |
| ----------- | ------------------------------------------- |
| **options** | [ResumeBannerOptions](#resumebanneroptions) |

**Since:** 0.0.1

---

### setApplicationMuted(...)[¶](#setapplicationmuted "Permanent link")

`[](#%5F%5Fcodelineno-30-1)setApplicationMuted(options: SetApplicationMutedOptions) => Promise<void>
`

Set whether the app is muted for ad playback.

Only available on Android and iOS.

| Param       | Type                                                      |
| ----------- | --------------------------------------------------------- |
| **options** | [SetApplicationMutedOptions](#setapplicationmutedoptions) |

**Since:** 0.0.1

---

### setApplicationVolume(...)[¶](#setapplicationvolume "Permanent link")

`[](#%5F%5Fcodelineno-31-1)setApplicationVolume(options: SetApplicationVolumeOptions) => Promise<void>
`

Set the app volume for ad playback.

Only available on Android and iOS.

| Param       | Type                                                        |
| ----------- | ----------------------------------------------------------- |
| **options** | [SetApplicationVolumeOptions](#setapplicationvolumeoptions) |

**Since:** 0.0.1

---

### setBannerFrame(...)[¶](#setbannerframe "Permanent link")

`[](#%5F%5Fcodelineno-32-1)setBannerFrame(options: SetBannerFrameOptions) => Promise<void>
`

Update the frame of a banner ad that was shown with a frame, for example after a layout change.

Only available on Android and iOS.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [SetBannerFrameOptions](#setbannerframeoptions) |

**Since:** 0.0.1

---

### showAppOpenAd(...)[¶](#showappopenad "Permanent link")

`[](#%5F%5Fcodelineno-33-1)showAppOpenAd(options: ShowAppOpenAdOptions) => Promise<void>
`

Show a loaded app open ad.

Only available on Android and iOS.

| Param       | Type                                          |
| ----------- | --------------------------------------------- |
| **options** | [ShowAppOpenAdOptions](#showappopenadoptions) |

**Since:** 0.0.1

---

### showBanner(...)[¶](#showbanner "Permanent link")

`[](#%5F%5Fcodelineno-34-1)showBanner(options: ShowBannerOptions) => Promise<ShowBannerResult>
`

Load and show a banner ad.

Multiple banner ads can be shown at the same time by using different identifiers.

Only available on Android and iOS.

| Param       | Type                                    |
| ----------- | --------------------------------------- |
| **options** | [ShowBannerOptions](#showbanneroptions) |

**Returns:** `Promise<[ShowBannerResult](#showbannerresult)>`

**Since:** 0.0.1

---

### showInterstitialAd(...)[¶](#showinterstitialad "Permanent link")

`[](#%5F%5Fcodelineno-35-1)showInterstitialAd(options: ShowInterstitialAdOptions) => Promise<void>
`

Show a loaded interstitial ad.

Only available on Android and iOS.

| Param       | Type                                                    |
| ----------- | ------------------------------------------------------- |
| **options** | [ShowInterstitialAdOptions](#showinterstitialadoptions) |

**Since:** 0.0.1

---

### showPrivacyOptionsForm()[¶](#showprivacyoptionsform "Permanent link")

`[](#%5F%5Fcodelineno-36-1)showPrivacyOptionsForm() => Promise<void>
`

Show the privacy options form of the User Messaging Platform (UMP).

Call this method when the user wants to change the consent settings, for example from a privacy settings page. Only required if `privacyOptionsRequired` is `true` in the result of `requestConsent(...)`.

Only available on Android and iOS.

**Since:** 0.0.1

---

### showRewardedAd(...)[¶](#showrewardedad "Permanent link")

`[](#%5F%5Fcodelineno-37-1)showRewardedAd(options: ShowRewardedAdOptions) => Promise<void>
`

Show a loaded rewarded ad.

Only available on Android and iOS.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [ShowRewardedAdOptions](#showrewardedadoptions) |

**Since:** 0.0.1

---

### showRewardedInterstitialAd(...)[¶](#showrewardedinterstitialad "Permanent link")

`[](#%5F%5Fcodelineno-38-1)showRewardedInterstitialAd(options: ShowRewardedInterstitialAdOptions) => Promise<void>
`

Show a loaded rewarded interstitial ad.

Only available on Android and iOS.

| Param       | Type                                                                    |
| ----------- | ----------------------------------------------------------------------- |
| **options** | [ShowRewardedInterstitialAdOptions](#showrewardedinterstitialadoptions) |

**Since:** 0.0.1

---

### addListener('adClicked', ...)[¶](#addlisteneradclicked "Permanent link")

`[](#%5F%5Fcodelineno-39-1)addListener(eventName: 'adClicked', listenerFunc: (event: AdClickedEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has been clicked.

Only available on Android and iOS.

| Param            | Type                                               |
| ---------------- | -------------------------------------------------- |
| **eventName**    | 'adClicked'                                        |
| **listenerFunc** | (event: [AdClickedEvent](#adclickedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adDismissed', ...)[¶](#addlisteneraddismissed "Permanent link")

`[](#%5F%5Fcodelineno-40-1)addListener(eventName: 'adDismissed', listenerFunc: (event: AdDismissedEvent) => void) => Promise<PluginListenerHandle>
`

Called when a full-screen ad has been dismissed.

Only available on Android and iOS.

| Param            | Type                                                   |
| ---------------- | ------------------------------------------------------ |
| **eventName**    | 'adDismissed'                                          |
| **listenerFunc** | (event: [AdDismissedEvent](#addismissedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adFailedToLoad', ...)[¶](#addlisteneradfailedtoload "Permanent link")

`[](#%5F%5Fcodelineno-41-1)addListener(eventName: 'adFailedToLoad', listenerFunc: (event: AdFailedToLoadEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has failed to load.

Only available on Android and iOS.

| Param            | Type                                                         |
| ---------------- | ------------------------------------------------------------ |
| **eventName**    | 'adFailedToLoad'                                             |
| **listenerFunc** | (event: [AdFailedToLoadEvent](#adfailedtoloadevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adFailedToShow', ...)[¶](#addlisteneradfailedtoshow "Permanent link")

`[](#%5F%5Fcodelineno-42-1)addListener(eventName: 'adFailedToShow', listenerFunc: (event: AdFailedToShowEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has failed to show.

Only available on Android and iOS.

| Param            | Type                                                         |
| ---------------- | ------------------------------------------------------------ |
| **eventName**    | 'adFailedToShow'                                             |
| **listenerFunc** | (event: [AdFailedToShowEvent](#adfailedtoshowevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adImpressionRecorded', ...)[¶](#addlisteneradimpressionrecorded "Permanent link")

`[](#%5F%5Fcodelineno-43-1)addListener(eventName: 'adImpressionRecorded', listenerFunc: (event: AdImpressionRecordedEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has recorded an impression.

Only available on Android and iOS.

| Param            | Type                                                                     |
| ---------------- | ------------------------------------------------------------------------ |
| **eventName**    | 'adImpressionRecorded'                                                   |
| **listenerFunc** | (event: [AdImpressionRecordedEvent](#adimpressionrecordedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adLoaded', ...)[¶](#addlisteneradloaded "Permanent link")

`[](#%5F%5Fcodelineno-44-1)addListener(eventName: 'adLoaded', listenerFunc: (event: AdLoadedEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has been loaded.

Only available on Android and iOS.

| Param            | Type                                             |
| ---------------- | ------------------------------------------------ |
| **eventName**    | 'adLoaded'                                       |
| **listenerFunc** | (event: [AdLoadedEvent](#adloadedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adRevenuePaid', ...)[¶](#addlisteneradrevenuepaid "Permanent link")

`[](#%5F%5Fcodelineno-45-1)addListener(eventName: 'adRevenuePaid', listenerFunc: (event: AdRevenuePaidEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has earned revenue.

Use this event to track the ad revenue of your app, for example for lifetime value (LTV) pipelines.

Only available on Android and iOS.

| Param            | Type                                                       |
| ---------------- | ---------------------------------------------------------- |
| **eventName**    | 'adRevenuePaid'                                            |
| **listenerFunc** | (event: [AdRevenuePaidEvent](#adrevenuepaidevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('adShowed', ...)[¶](#addlisteneradshowed "Permanent link")

`[](#%5F%5Fcodelineno-46-1)addListener(eventName: 'adShowed', listenerFunc: (event: AdShowedEvent) => void) => Promise<PluginListenerHandle>
`

Called when an ad has been shown.

Only available on Android and iOS.

| Param            | Type                                             |
| ---------------- | ------------------------------------------------ |
| **eventName**    | 'adShowed'                                       |
| **listenerFunc** | (event: [AdShowedEvent](#adshowedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('bannerSizeChanged', ...)[¶](#addlistenerbannersizechanged "Permanent link")

`[](#%5F%5Fcodelineno-47-1)addListener(eventName: 'bannerSizeChanged', listenerFunc: (event: BannerSizeChangedEvent) => void) => Promise<PluginListenerHandle>
`

Called when the size of a banner ad has changed, for example after a collapsible banner has been expanded or collapsed.

Only available on Android and iOS.

| Param            | Type                                                               |
| ---------------- | ------------------------------------------------------------------ |
| **eventName**    | 'bannerSizeChanged'                                                |
| **listenerFunc** | (event: [BannerSizeChangedEvent](#bannersizechangedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('rewardEarned', ...)[¶](#addlistenerrewardearned "Permanent link")

`[](#%5F%5Fcodelineno-48-1)addListener(eventName: 'rewardEarned', listenerFunc: (event: RewardEarnedEvent) => void) => Promise<PluginListenerHandle>
`

Called when the user has earned a reward from a rewarded ad or a rewarded interstitial ad.

Only available on Android and iOS.

| Param            | Type                                                     |
| ---------------- | -------------------------------------------------------- |
| **eventName**    | 'rewardEarned'                                           |
| **listenerFunc** | (event: [RewardEarnedEvent](#rewardearnedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### removeAllListeners()[¶](#removealllisteners "Permanent link")

`[](#%5F%5Fcodelineno-49-1)removeAllListeners() => Promise<void>
`

Remove all listeners for this plugin.

**Since:** 0.0.1

---

### Interfaces[¶](#interfaces "Permanent link")

#### EnableAppOpenAutoShowOptions[¶](#enableappopenautoshowoptions "Permanent link")

| Prop            | Type   | Description                                                                   | Default | Since |
| --------------- | ------ | ----------------------------------------------------------------------------- | ------- | ----- |
| **adUnitId**    | string | The ad unit ID of the app open ad.                                            |         | 0.0.1 |
| **minInterval** | number | The minimum interval in seconds between two automatically shown app open ads. | 14400   | 0.0.1 |

#### HideBannerOptions[¶](#hidebanneroptions "Permanent link")

| Prop   | Type   | Description                              | Since |
| ------ | ------ | ---------------------------------------- | ----- |
| **id** | string | The identifier of the banner ad to hide. | 0.0.1 |

#### InitializeOptions[¶](#initializeoptions "Permanent link")

| Prop                             | Type                                      | Description                                                                                                               | Since |
| -------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----- |
| **maxAdContentRating**           | [MaxAdContentRating](#maxadcontentrating) | The maximum ad content rating for all ad requests.                                                                        | 0.0.1 |
| **tagForChildDirectedTreatment** | boolean                                   | Whether the app should be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA). | 0.0.1 |
| **tagForUnderAgeOfConsent**      | boolean                                   | Whether the ad requests should be handled in a manner suitable for users under the age of consent.                        | 0.0.1 |
| **testDeviceIds**                | string\[\]                                | The identifiers of the devices that should receive test ads.                                                              | 0.0.1 |

#### LoadAppOpenAdResult[¶](#loadappopenadresult "Permanent link")

| Prop   | Type   | Description               | Since |
| ------ | ------ | ------------------------- | ----- |
| **id** | string | The identifier of the ad. | 0.0.1 |

#### LoadAppOpenAdOptions[¶](#loadappopenadoptions "Permanent link")

| Prop               | Type                                  | Description                                                                  | Since |
| ------------------ | ------------------------------------- | ---------------------------------------------------------------------------- | ----- |
| **adUnitId**       | string                                | The ad unit ID of the app open ad.                                           | 0.0.1 |
| **id**             | string                                | The identifier of the ad. If not provided, a random identifier is generated. | 0.0.1 |
| **requestOptions** | [AdRequestOptions](#adrequestoptions) | The additional options for the ad request.                                   | 0.0.1 |

#### AdRequestOptions[¶](#adrequestoptions "Permanent link")

| Prop           | Type       | Description                                                                                                                                           | Since |
| -------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **contentUrl** | string     | The URL string for a web page whose content matches the app's primary content. This web page content is used for targeting and brand safety purposes. | 0.0.1 |
| **keywords**   | string\[\] | The keywords describing the app's content for targeting purposes.                                                                                     | 0.0.1 |

#### LoadInterstitialAdResult[¶](#loadinterstitialadresult "Permanent link")

| Prop   | Type   | Description               | Since |
| ------ | ------ | ------------------------- | ----- |
| **id** | string | The identifier of the ad. | 0.0.1 |

#### LoadInterstitialAdOptions[¶](#loadinterstitialadoptions "Permanent link")

| Prop               | Type                                  | Description                                                                  | Since |
| ------------------ | ------------------------------------- | ---------------------------------------------------------------------------- | ----- |
| **adUnitId**       | string                                | The ad unit ID of the interstitial ad.                                       | 0.0.1 |
| **id**             | string                                | The identifier of the ad. If not provided, a random identifier is generated. | 0.0.1 |
| **requestOptions** | [AdRequestOptions](#adrequestoptions) | The additional options for the ad request.                                   | 0.0.1 |

#### LoadRewardedAdResult[¶](#loadrewardedadresult "Permanent link")

| Prop   | Type   | Description               | Since |
| ------ | ------ | ------------------------- | ----- |
| **id** | string | The identifier of the ad. | 0.0.1 |

#### LoadRewardedAdOptions[¶](#loadrewardedadoptions "Permanent link")

| Prop                       | Type                                                            | Description                                                                  | Since |
| -------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----- |
| **adUnitId**               | string                                                          | The ad unit ID of the rewarded ad.                                           | 0.0.1 |
| **id**                     | string                                                          | The identifier of the ad. If not provided, a random identifier is generated. | 0.0.1 |
| **requestOptions**         | [AdRequestOptions](#adrequestoptions)                           | The additional options for the ad request.                                   | 0.0.1 |
| **serverSideVerification** | [ServerSideVerificationOptions](#serversideverificationoptions) | The options for the server-side verification (SSV) of reward grants.         | 0.0.1 |

#### ServerSideVerificationOptions[¶](#serversideverificationoptions "Permanent link")

| Prop           | Type   | Description                                                              | Since |
| -------------- | ------ | ------------------------------------------------------------------------ | ----- |
| **customData** | string | The custom data to include in the server-side verification callback.     | 0.0.1 |
| **userId**     | string | The user identifier to include in the server-side verification callback. | 0.0.1 |

#### LoadRewardedInterstitialAdResult[¶](#loadrewardedinterstitialadresult "Permanent link")

| Prop   | Type   | Description               | Since |
| ------ | ------ | ------------------------- | ----- |
| **id** | string | The identifier of the ad. | 0.0.1 |

#### LoadRewardedInterstitialAdOptions[¶](#loadrewardedinterstitialadoptions "Permanent link")

| Prop                       | Type                                                            | Description                                                                  | Since |
| -------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----- |
| **adUnitId**               | string                                                          | The ad unit ID of the rewarded interstitial ad.                              | 0.0.1 |
| **id**                     | string                                                          | The identifier of the ad. If not provided, a random identifier is generated. | 0.0.1 |
| **requestOptions**         | [AdRequestOptions](#adrequestoptions)                           | The additional options for the ad request.                                   | 0.0.1 |
| **serverSideVerification** | [ServerSideVerificationOptions](#serversideverificationoptions) | The options for the server-side verification (SSV) of reward grants.         | 0.0.1 |

#### RemoveBannerOptions[¶](#removebanneroptions "Permanent link")

| Prop   | Type   | Description                                | Since |
| ------ | ------ | ------------------------------------------ | ----- |
| **id** | string | The identifier of the banner ad to remove. | 0.0.1 |

#### RequestConsentResult[¶](#requestconsentresult "Permanent link")

| Prop                       | Type                            | Description                                                                                             | Since |
| -------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------- | ----- |
| **canRequestAds**          | boolean                         | Whether ads can be requested.                                                                           | 0.0.1 |
| **privacyOptionsRequired** | boolean                         | Whether a privacy options form should be offered to the user, for example from a privacy settings page. | 0.0.1 |
| **status**                 | [ConsentStatus](#consentstatus) | The consent status.                                                                                     | 0.0.1 |

#### RequestConsentOptions[¶](#requestconsentoptions "Permanent link")

| Prop               | Type                              | Description                                                         | Since |
| ------------------ | --------------------------------- | ------------------------------------------------------------------- | ----- |
| **debugGeography** | [DebugGeography](#debuggeography) | The debug geography for testing purposes.                           | 0.0.1 |
| **testDeviceIds**  | string\[\]                        | The identifiers of the devices that should use the debug geography. | 0.0.1 |

#### ResumeBannerOptions[¶](#resumebanneroptions "Permanent link")

| Prop   | Type   | Description                                | Since |
| ------ | ------ | ------------------------------------------ | ----- |
| **id** | string | The identifier of the banner ad to resume. | 0.0.1 |

#### SetApplicationMutedOptions[¶](#setapplicationmutedoptions "Permanent link")

| Prop      | Type    | Description                               | Since |
| --------- | ------- | ----------------------------------------- | ----- |
| **muted** | boolean | Whether the app is muted for ad playback. | 0.0.1 |

#### SetApplicationVolumeOptions[¶](#setapplicationvolumeoptions "Permanent link")

| Prop       | Type   | Description                                                                                 | Since |
| ---------- | ------ | ------------------------------------------------------------------------------------------- | ----- |
| **volume** | number | The app volume for ad playback as a value between 0 (silent) and 1 (current device volume). | 0.0.1 |

#### SetBannerFrameOptions[¶](#setbannerframeoptions "Permanent link")

| Prop      | Type                        | Description                      | Since |
| --------- | --------------------------- | -------------------------------- | ----- |
| **frame** | [BannerFrame](#bannerframe) | The new frame of the banner ad.  | 0.0.1 |
| **id**    | string                      | The identifier of the banner ad. | 0.0.1 |

#### BannerFrame[¶](#bannerframe "Permanent link")

The frame of a banner ad in CSS pixels, relative to the top-left corner of the web view.

| Prop       | Type   | Description                                                                                                                                                                                                | Since |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **height** | number | The height of the frame in CSS pixels. Used as the maximum height for the inline adaptive banner size. Ignored for the adaptive banner size because its height is determined by the Google Mobile Ads SDK. | 0.0.1 |
| **width**  | number | The width of the frame in CSS pixels.                                                                                                                                                                      | 0.0.1 |
| **x**      | number | The x-coordinate of the frame in CSS pixels.                                                                                                                                                               | 0.0.1 |
| **y**      | number | The y-coordinate of the frame in CSS pixels.                                                                                                                                                               | 0.0.1 |

#### ShowAppOpenAdOptions[¶](#showappopenadoptions "Permanent link")

| Prop   | Type   | Description                       | Since |
| ------ | ------ | --------------------------------- | ----- |
| **id** | string | The identifier of the ad to show. | 0.0.1 |

#### ShowBannerResult[¶](#showbannerresult "Permanent link")

| Prop   | Type   | Description                      | Since |
| ------ | ------ | -------------------------------- | ----- |
| **id** | string | The identifier of the banner ad. | 0.0.1 |

#### ShowBannerOptions[¶](#showbanneroptions "Permanent link")

| Prop               | Type                                  | Description                                                                                                                                                                                                                             | Default                   | Since |
| ------------------ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ----- |
| **adUnitId**       | string                                | The ad unit ID of the banner ad.                                                                                                                                                                                                        |                           | 0.0.1 |
| **collapsible**    | boolean                               | Whether the banner ad is collapsible.                                                                                                                                                                                                   | false                     | 0.0.1 |
| **frame**          | [BannerFrame](#bannerframe)           | The frame of the banner ad in CSS pixels for inline placement, for example measured with getBoundingClientRect(). If provided, the banner ad is placed at the given frame instead of the given position.                                |                           | 0.0.1 |
| **id**             | string                                | The identifier of the banner ad. If not provided, a random identifier is generated.                                                                                                                                                     |                           | 0.0.1 |
| **mode**           | [BannerMode](#bannermode)             | The layout mode of the banner ad. In 'overlay' mode, the banner ad is displayed on top of the web view. In 'resize' mode, the web view is resized so that the banner ad never overlaps the web content. Ignored if a frame is provided. | 'overlay'                 | 0.0.1 |
| **position**       | [BannerPosition](#bannerposition)     | The position of the banner ad. Ignored if a frame is provided.                                                                                                                                                                          | 'bottom'                  | 0.0.1 |
| **requestOptions** | [AdRequestOptions](#adrequestoptions) | The additional options for the ad request.                                                                                                                                                                                              |                           | 0.0.1 |
| **size**           | [BannerSize](#bannersize)             | The size of the banner ad.                                                                                                                                                                                                              | BannerSize.AdaptiveBanner | 0.0.1 |

#### ShowInterstitialAdOptions[¶](#showinterstitialadoptions "Permanent link")

| Prop   | Type   | Description                       | Since |
| ------ | ------ | --------------------------------- | ----- |
| **id** | string | The identifier of the ad to show. | 0.0.1 |

#### ShowRewardedAdOptions[¶](#showrewardedadoptions "Permanent link")

| Prop   | Type   | Description                       | Since |
| ------ | ------ | --------------------------------- | ----- |
| **id** | string | The identifier of the ad to show. | 0.0.1 |

#### ShowRewardedInterstitialAdOptions[¶](#showrewardedinterstitialadoptions "Permanent link")

| Prop   | Type   | Description                       | Since |
| ------ | ------ | --------------------------------- | ----- |
| **id** | string | The identifier of the ad to show. | 0.0.1 |

#### PluginListenerHandle[¶](#pluginlistenerhandle "Permanent link")

| Prop       | Type                |
| ---------- | ------------------- |
| **remove** | () => Promise<void> |

#### AdClickedEvent[¶](#adclickedevent "Permanent link")

| Prop       | Type                  | Description               | Since |
| ---------- | --------------------- | ------------------------- | ----- |
| **format** | [AdFormat](#adformat) | The format of the ad.     | 0.0.1 |
| **id**     | string                | The identifier of the ad. | 0.0.1 |

#### AdDismissedEvent[¶](#addismissedevent "Permanent link")

| Prop       | Type                  | Description               | Since |
| ---------- | --------------------- | ------------------------- | ----- |
| **format** | [AdFormat](#adformat) | The format of the ad.     | 0.0.1 |
| **id**     | string                | The identifier of the ad. | 0.0.1 |

#### AdFailedToLoadEvent[¶](#adfailedtoloadevent "Permanent link")

| Prop             | Type                  | Description                                              | Since |
| ---------------- | --------------------- | -------------------------------------------------------- | ----- |
| **errorCode**    | string                | The error code reported by the Google Mobile Ads SDK.    | 0.0.1 |
| **errorMessage** | string                | The error message reported by the Google Mobile Ads SDK. | 0.0.1 |
| **format**       | [AdFormat](#adformat) | The format of the ad.                                    | 0.0.1 |
| **id**           | string                | The identifier of the ad.                                | 0.0.1 |

#### AdFailedToShowEvent[¶](#adfailedtoshowevent "Permanent link")

| Prop             | Type                  | Description                                              | Since |
| ---------------- | --------------------- | -------------------------------------------------------- | ----- |
| **errorCode**    | string                | The error code reported by the Google Mobile Ads SDK.    | 0.0.1 |
| **errorMessage** | string                | The error message reported by the Google Mobile Ads SDK. | 0.0.1 |
| **format**       | [AdFormat](#adformat) | The format of the ad.                                    | 0.0.1 |
| **id**           | string                | The identifier of the ad.                                | 0.0.1 |

#### AdImpressionRecordedEvent[¶](#adimpressionrecordedevent "Permanent link")

| Prop       | Type                  | Description               | Since |
| ---------- | --------------------- | ------------------------- | ----- |
| **format** | [AdFormat](#adformat) | The format of the ad.     | 0.0.1 |
| **id**     | string                | The identifier of the ad. | 0.0.1 |

#### AdLoadedEvent[¶](#adloadedevent "Permanent link")

| Prop       | Type                  | Description               | Since |
| ---------- | --------------------- | ------------------------- | ----- |
| **format** | [AdFormat](#adformat) | The format of the ad.     | 0.0.1 |
| **id**     | string                | The identifier of the ad. | 0.0.1 |

#### AdRevenuePaidEvent[¶](#adrevenuepaidevent "Permanent link")

| Prop             | Type                                  | Description                                                          | Since |
| ---------------- | ------------------------------------- | -------------------------------------------------------------------- | ----- |
| **currencyCode** | string                                | The ISO 4217 currency code of the value.                             | 0.0.1 |
| **format**       | [AdFormat](#adformat)                 | The format of the ad.                                                | 0.0.1 |
| **id**           | string                                | The identifier of the ad.                                            | 0.0.1 |
| **precision**    | [RevenuePrecision](#revenueprecision) | The precision of the reported value.                                 | 0.0.1 |
| **value**        | number                                | The monetary value earned by the ad in the currency's standard unit. | 0.0.1 |

#### AdShowedEvent[¶](#adshowedevent "Permanent link")

| Prop       | Type                  | Description               | Since |
| ---------- | --------------------- | ------------------------- | ----- |
| **format** | [AdFormat](#adformat) | The format of the ad.     | 0.0.1 |
| **id**     | string                | The identifier of the ad. | 0.0.1 |

#### BannerSizeChangedEvent[¶](#bannersizechangedevent "Permanent link")

| Prop       | Type   | Description                                | Since |
| ---------- | ------ | ------------------------------------------ | ----- |
| **height** | number | The height of the banner ad in CSS pixels. | 0.0.1 |
| **id**     | string | The identifier of the banner ad.           | 0.0.1 |
| **width**  | number | The width of the banner ad in CSS pixels.  | 0.0.1 |

#### RewardEarnedEvent[¶](#rewardearnedevent "Permanent link")

| Prop       | Type   | Description               | Since |
| ---------- | ------ | ------------------------- | ----- |
| **amount** | number | The amount of the reward. | 0.0.1 |
| **id**     | string | The identifier of the ad. | 0.0.1 |
| **type**   | string | The type of the reward.   | 0.0.1 |

### Type Aliases[¶](#type-aliases "Permanent link")

#### ConsentStatus[¶](#consentstatus "Permanent link")

The consent status of the User Messaging Platform (UMP).

`'not-required' | 'obtained' | 'required' | 'unknown'`

#### BannerMode[¶](#bannermode "Permanent link")

The layout mode of a banner ad.

`'overlay' | 'resize'`

#### BannerPosition[¶](#bannerposition "Permanent link")

The position of a banner ad.

`'bottom' | 'top'`

### Enums[¶](#enums "Permanent link")

#### MaxAdContentRating[¶](#maxadcontentrating "Permanent link")

| Members | Value | Description                                                 | Since |
| ------- | ----- | ----------------------------------------------------------- | ----- |
| **G**   | 'G'   | Content suitable for general audiences.                     | 0.0.1 |
| **Ma**  | 'MA'  | Content suitable only for mature audiences.                 | 0.0.1 |
| **Pg**  | 'PG'  | Content suitable for most audiences with parental guidance. | 0.0.1 |
| **T**   | 'T'   | Content suitable for teen and older audiences.              | 0.0.1 |

#### DebugGeography[¶](#debuggeography "Permanent link")

| Members              | Value                  | Description                                                            | Since |
| -------------------- | ---------------------- | ---------------------------------------------------------------------- | ----- |
| **Disabled**         | 'DISABLED'             | The debug geography is disabled.                                       | 0.0.1 |
| **Eea**              | 'EEA'                  | The device appears as located in the European Economic Area (EEA).     | 0.0.1 |
| **Other**            | 'OTHER'                | The device appears as located in a region with no regulation in force. | 0.0.1 |
| **RegulatedUsState** | 'REGULATED\_US\_STATE' | The device appears as located in a regulated US state.                 | 0.0.1 |

#### BannerSize[¶](#bannersize "Permanent link")

| Members                  | Value                      | Description                                                                                                                                                             | Since |
| ------------------------ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **AdaptiveBanner**       | 'ADAPTIVE\_BANNER'         | An adaptive banner with a width that matches the screen width (or the frame width if a frame is provided) and a height that is determined by the Google Mobile Ads SDK. | 0.0.1 |
| **Banner**               | 'BANNER'                   | A standard banner with a size of 320x50.                                                                                                                                | 0.0.1 |
| **FullBanner**           | 'FULL\_BANNER'             | A full-size banner with a size of 468x60 (tablets only).                                                                                                                | 0.0.1 |
| **InlineAdaptiveBanner** | 'INLINE\_ADAPTIVE\_BANNER' | An adaptive banner for inline placement in scrolling content with a height that is limited by the height of the provided frame.                                         | 0.0.1 |
| **LargeBanner**          | 'LARGE\_BANNER'            | A large banner with a size of 320x100.                                                                                                                                  | 0.0.1 |
| **Leaderboard**          | 'LEADERBOARD'              | A leaderboard banner with a size of 728x90 (tablets only).                                                                                                              | 0.0.1 |
| **MediumRectangle**      | 'MEDIUM\_RECTANGLE'        | A medium rectangle banner with a size of 300x250.                                                                                                                       | 0.0.1 |

#### AdFormat[¶](#adformat "Permanent link")

| Members                  | Value                    | Description                 | Since |
| ------------------------ | ------------------------ | --------------------------- | ----- |
| **AppOpen**              | 'APP\_OPEN'              | An app open ad.             | 0.0.1 |
| **Banner**               | 'BANNER'                 | A banner ad.                | 0.0.1 |
| **Interstitial**         | 'INTERSTITIAL'           | An interstitial ad.         | 0.0.1 |
| **Rewarded**             | 'REWARDED'               | A rewarded ad.              | 0.0.1 |
| **RewardedInterstitial** | 'REWARDED\_INTERSTITIAL' | A rewarded interstitial ad. | 0.0.1 |

#### RevenuePrecision[¶](#revenueprecision "Permanent link")

| Members               | Value                 | Description                                     | Since |
| --------------------- | --------------------- | ----------------------------------------------- | ----- |
| **Estimated**         | 'ESTIMATED'           | The value is estimated.                         | 0.0.1 |
| **Precise**           | 'PRECISE'             | The value is the precise value paid for the ad. | 0.0.1 |
| **PublisherProvided** | 'PUBLISHER\_PROVIDED' | The value is provided by the publisher.         | 0.0.1 |
| **Unknown**           | 'UNKNOWN'             | The value is unknown.                           | 0.0.1 |

## FAQ[¶](#faq "Permanent link")

### How is this plugin different from other similar plugins?[¶](#how-is-this-plugin-different-from-other-similar-plugins "Permanent link")

It covers the full AdMob surface on Android and iOS — banner, interstitial, rewarded, rewarded interstitial and app open ads — built on the Next-Gen Google Mobile Ads SDK, with correct edge-to-edge banner layout, ad revenue events for your LTV pipelines, and the canonical User Messaging Platform (UMP) consent flow in a single method call. Every ad format shares a uniform load/show API, rejections carry typed error codes, and you can run multiple typed ad instances at once — all fully typed, actively maintained against the latest SDK and Capacitor versions, and backed by dedicated support. If you only need a single banner, a minimal integration may be enough; if you want the complete monetization and consent story in one dependency, this plugin is built for it.

### Are ads available on the web?[¶](#are-ads-available-on-the-web "Permanent link")

No. AdMob is a mobile advertising product, so all methods are only available on Android and iOS. On the web, all methods reject with an unimplemented error. For web advertising, take a look at [Google AdSense](https://adsense.google.com/).

### Why do my ad requests fail with `CONSENT_NOT_GATHERED`?[¶](#why-do-my-ad-requests-fail-with-consent%5Fnot%5Fgathered "Permanent link")

The plugin only requests ads if the consent requirements are met. Call `requestConsent(...)` on every app launch before loading any ads. See [Usage](#gather-consent-and-initialize-the-sdk) for the canonical flow.

### Why does my app crash on Android without this plugin's error message?[¶](#why-does-my-app-crash-on-android-without-this-plugins-error-message "Permanent link")

The Google Mobile Ads SDK crashes the app if the AdMob app ID is missing or invalid. The plugin detects a missing app ID and rejects `initialize(...)` with a clear error message instead. However, it cannot detect an _invalid_ app ID, so double-check the value in your `AndroidManifest.xml` and `Info.plist` files.

### Do I have to comply with any ad policies?[¶](#do-i-have-to-comply-with-any-ad-policies "Permanent link")

Yes. Apps that show AdMob ads must comply with [Google's ad policies](https://support.google.com/admob/answer/6128543) and, in the EEA and the UK, with Google's [EU User Consent Policy](https://www.google.com/about/company/user-consent-policy/). This plugin ships the User Messaging Platform (UMP) consent flow to help you with that (see [Usage](#gather-consent-and-initialize-the-sdk)).

### Can I use this plugin with Ionic, React, Vue or Angular?[¶](#can-i-use-this-plugin-with-ionic-react-vue-or-angular "Permanent link")

Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.

## Related Plugins[¶](#related-plugins "Permanent link")

* [App Review](https://capawesome.io/docs/sdks/capacitor/app-review/): Ask happy users for a review at the right moment.
* [App Tracking Transparency](https://capawesome.io/docs/sdks/capacitor/app-tracking-transparency/): Request the tracking permission on iOS for personalized ads.
* [Purchases](https://capawesome.io/docs/sdks/capacitor/purchases/): Offer an ad-free experience with in-app purchases.

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/admob/CHANGELOG.md).

## Breaking Changes[¶](#breaking-changes "Permanent link")

See [BREAKING.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/admob/BREAKING.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/admob/LICENSE).

August 15, 2026 

Back to top

```json
{"@context": "https://schema.org", "@graph": [{"@type": "TechArticle", "@id": "https://capawesome.io/docs/sdks/capacitor/admob/#article", "headline": "Capacitor AdMob Plugin for Android & iOS", "name": "Capacitor AdMob Plugin for Android & iOS", "description": "Capacitor AdMob plugin to monetize apps with banner, interstitial, rewarded, and app open ads on Android and iOS, including UMP consent management.", "inLanguage": "en", "url": "https://capawesome.io/docs/sdks/capacitor/admob/", "mainEntityOfPage": "https://capawesome.io/docs/sdks/capacitor/admob/", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "about": {"@id": "https://capawesome.io/docs/sdks/capacitor/admob/#software"}}, {"@type": "SoftwareSourceCode", "@id": "https://capawesome.io/docs/sdks/capacitor/admob/#software", "name": "Capacitor AdMob Plugin for Android & iOS", "description": "Capacitor AdMob plugin to monetize apps with banner, interstitial, rewarded, and app open ads on Android and iOS, including UMP consent management.", "url": "https://capawesome.io/docs/sdks/capacitor/admob/", "programmingLanguage": "TypeScript", "runtimePlatform": "Capacitor", "codeRepository": "https://github.com/capawesome-team", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}}]}
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "How is this plugin different from other similar plugins?", "acceptedAnswer": {"@type": "Answer", "text": "It covers the full AdMob surface on Android and iOS — banner, interstitial, rewarded, rewarded interstitial and app open ads — built on the Next-Gen Google Mobile Ads SDK, with correct edge-to-edge banner layout, ad revenue events for your LTV pipelines, and the canonical User Messaging Platform (UMP) consent flow in a single method call. Every ad format shares a uniform load/show API, rejections carry typed error codes, and you can run multiple typed ad instances at once — all fully typed, actively maintained against the latest SDK and Capacitor versions, and backed by dedicated support. If you only need a single banner, a minimal integration may be enough; if you want the complete monetization and consent story in one dependency, this plugin is built for it."}}, {"@type": "Question", "name": "Are ads available on the web?", "acceptedAnswer": {"@type": "Answer", "text": "No. AdMob is a mobile advertising product, so all methods are only available on Android and iOS. On the web, all methods reject with an unimplemented error. For web advertising, take a look at Google AdSense."}}, {"@type": "Question", "name": "Why do my ad requests fail with CONSENT_NOT_GATHERED?", "acceptedAnswer": {"@type": "Answer", "text": "The plugin only requests ads if the consent requirements are met. Call requestConsent(...) on every app launch before loading any ads. See Usage for the canonical flow."}}, {"@type": "Question", "name": "Why does my app crash on Android without this plugin's error message?", "acceptedAnswer": {"@type": "Answer", "text": "The Google Mobile Ads SDK crashes the app if the AdMob app ID is missing or invalid. The plugin detects a missing app ID and rejects initialize(...) with a clear error message instead. However, it cannot detect an invalid app ID, so double-check the value in your AndroidManifest.xml and Info.plist files."}}, {"@type": "Question", "name": "Do I have to comply with any ad policies?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. Apps that show AdMob ads must comply with Google's ad policies and, in the EEA and the UK, with Google's EU User Consent Policy. This plugin ships the User Messaging Platform (UMP) consent flow to help you with that (see Usage)."}}, {"@type": "Question", "name": "Can I use this plugin with Ionic, React, Vue or Angular?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects."}}], "url": "https://capawesome.io/docs/sdks/capacitor/admob/"}
```
