---
title: How to Handle AdMob GDPR Consent (UMP) in a Capacitor App
description: Learn how to handle AdMob GDPR consent in a Capacitor app with the User Messaging Platform (UMP), from the consent form to testing with debug geography.
date:
  created: 2026-08-25
  updated: 2026-08-25
authors:
  - robingenz
categories:
  - Capacitor
  - Guides
  - SDKs
links:
  - Capacitor AdMob: sdks/capacitor/admob.md
faq: true
---

# How to Handle AdMob GDPR Consent (UMP) in a Capacitor App

If your app shows AdMob ads to users in the European Economic Area (EEA) or the UK, Google requires you to gather their consent before requesting a single ad. Search for how to handle AdMob GDPR consent in a Capacitor app, however, and the results are mostly open GitHub issues without a working answer. This guide gives you the complete flow with the [Capacitor AdMob plugin](../../sdks/capacitor/admob.md): requesting consent with the User Messaging Platform (UMP) before initializing the Google Mobile Ads SDK, offering a privacy options form, ordering App Tracking Transparency correctly on iOS, and testing everything with debug geography before your users ever see the consent form.

<!-- more -->

<div class="capawesome-z29o10a">
  <a href="https://capawesome.io/" target="_blank">
    <img alt="Build and deploy your Capacitor app with Capawesome Cloud" src="https://capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1" />
  </a>
</div>

## Key Takeaways

- Google requires consent through the User Messaging Platform (UMP) before requesting ads from users in the EEA, the UK, and regulated US states.
- Call `requestConsent(...)` on every app launch, before initializing the Google Mobile Ads SDK; the consent form is only shown when it is required.
- Initialize the SDK only if `canRequestAds` is `true` in the result.
- If `privacyOptionsRequired` is `true`, you must offer the user a way to change their consent settings, for example a button that calls `showPrivacyOptionsForm()`.
- On iOS, the recommended order is UMP consent first, then the App Tracking Transparency prompt, then SDK initialization.
- Test the flow with the `debugGeography` and `testDeviceIds` options and reset the stored consent state with `resetConsent()`.

## What Is the User Messaging Platform (UMP)?

The User Messaging Platform (UMP) is Google's consent management solution for AdMob. It displays the consent message you configure in the AdMob console, stores the user's choices on the device, and tells your app whether ads may be requested. Under Google's [EU User Consent Policy](https://www.google.com/about/company/user-consent-policy/){:target="_blank"}, apps that serve ads to users in the EEA or the UK must obtain their consent for the use of personal data, and the GDPR consent message follows the IAB Transparency and Consent Framework (TCF). Several US states have passed their own privacy regulations, which is why the UMP also knows a "regulated US state" geography next to the GDPR regions.

## Set Up Your Consent Message in AdMob

Before your app can show a consent form, a consent message must exist. Create one in the AdMob console under **Privacy & messaging**: set up a GDPR message for your app, adjust the wording and styling if you like, and publish it. Google's help center walks through the details in [Set up a GDPR message](https://support.google.com/admob/answer/10113207){:target="_blank"}. If you also target users in regulated US states, create a US states message the same way. Without a published message for the user's region, the consent request fails with the `CONSENT_FORM_UNAVAILABLE` error described later in this guide.

## Do You Need to Request Consent Before Initializing the Mobile Ads SDK?

Yes. Google's [privacy documentation](https://developers.google.com/admob/android/privacy){:target="_blank"} requires that you request the latest consent information on every app launch, show the consent form if consent is required, and only then initialize the Google Mobile Ads SDK and load ads. The check runs on every launch because the answer can change: the user may have moved into a regulated region, withdrawn their consent, or their stored consent may have expired.

The Capacitor AdMob plugin enforces this order for you. All ad load methods reject with the `CONSENT_NOT_GATHERED` error code until the consent requirements are met, so an ad request that would violate Google's EU User Consent Policy never leaves the device.

## Request AdMob GDPR Consent in Your Capacitor App

The Capacitor AdMob plugin is available to [Capawesome Insiders](https://capawesome.io/insiders/){:target="_blank"}. To install it, please refer to the [Installation](../../sdks/capacitor/admob.md/#installation) section in the plugin documentation.

The plugin, which is built on the Next-Gen Google Mobile Ads SDK, wraps the canonical UMP flow in a single method. Call [`requestConsent(...)`](../../sdks/capacitor/admob.md#requestconsent) on every app launch; it requests the latest consent information and shows the consent form only if consent is required:

```typescript
import { Admob } from '@capawesome-team/capacitor-admob';

const setupAds = async () => {
  const { canRequestAds, privacyOptionsRequired } = await Admob.requestConsent();
  if (canRequestAds) {
    await Admob.initialize();
  }
  return privacyOptionsRequired;
};
```

For a user in Germany, the consent form appears on the first launch; on later launches, the method resolves immediately with the stored choices. For a user outside the regulated regions, no form is shown at all.

The result carries everything you need for the rest of the flow:

- `canRequestAds`: whether ads may be requested. If it is `true`, initialize the SDK with [`initialize(...)`](../../sdks/capacitor/admob.md#initialize) and start loading ads. If it is `false`, skip the initialization; your app keeps running without ads and requests consent again on the next launch.
- `privacyOptionsRequired`: whether you must offer the user a way to change their consent settings. The next section covers what to do with it.
- `status`: the consent status, one of `not-required`, `obtained`, `required`, or `unknown`. You rarely need it for control flow, but it is useful for debugging and analytics.

## Offer a Privacy Options Form

Consent under the GDPR is only valid if the user can withdraw it as easily as they gave it. When `privacyOptionsRequired` is `true`, add an entry point to your app, for example a "Privacy settings" button on your settings page, that reopens the consent options with [`showPrivacyOptionsForm()`](../../sdks/capacitor/admob.md#showprivacyoptionsform):

```typescript
import { Admob } from '@capawesome-team/capacitor-admob';

const showPrivacyOptions = async () => {
  await Admob.showPrivacyOptionsForm();
};
```

The form presents the same options as the initial consent message, so the user can review or change their choices at any time. Keep the entry point permanently visible; hiding it behind a one-time dialog does not satisfy the requirement.

## Handle App Tracking Transparency on iOS

To serve personalized ads on iOS, you additionally need the user's tracking permission through Apple's App Tracking Transparency (ATT) framework. Google recommends a specific order, and following it helps you avoid App Store rejections:

1. Call `requestConsent(...)` first. On iOS, the UMP consent form includes the App Tracking Transparency context, preparing the user for the system prompt.
2. Request the tracking permission with the free [Capacitor App Tracking Transparency plugin](../../sdks/capacitor/app-tracking-transparency.md).
3. Initialize the Google Mobile Ads SDK.

In code, the complete startup sequence looks like this:

```typescript
import { Admob } from '@capawesome-team/capacitor-admob';
import { AppTrackingTransparency } from '@capawesome/capacitor-app-tracking-transparency';
import { Capacitor } from '@capacitor/core';

const setupAds = async () => {
  const { canRequestAds } = await Admob.requestConsent();
  if (Capacitor.getPlatform() === 'ios') {
    await AppTrackingTransparency.requestPermission();
  }
  if (canRequestAds) {
    await Admob.initialize();
  }
};
```

The system prompt is shown once per install; afterwards, [`requestPermission()`](../../sdks/capacitor/app-tracking-transparency.md#requestpermission) resolves with the existing status. Remember to add the `NSUserTrackingUsageDescription` key to your `Info.plist` file, which the plugin documentation explains in detail.

## Test Your Consent Flow with Debug Geography

You can test the consent form from anywhere in the world by making the device appear as located in a regulated region. Pass the `debugGeography` and `testDeviceIds` options to `requestConsent(...)` and clear the stored consent state with [`resetConsent()`](../../sdks/capacitor/admob.md#resetconsent) so the form appears again on every test run:

```typescript
import { Admob, DebugGeography } from '@capawesome-team/capacitor-admob';

const testConsent = async () => {
  await Admob.resetConsent();
  await Admob.requestConsent({
    debugGeography: DebugGeography.Eea,
    testDeviceIds: ['YOUR_TEST_DEVICE_ID'],
  });
};
```

The debug geography only applies to devices registered in `testDeviceIds`. To find your test device ID, run the app once on the device and look for it in the native log output (Logcat on Android, the Xcode console on iOS). To simulate a US privacy state instead of the EEA, use `DebugGeography.RegulatedUsState`. And since `resetConsent()` deletes the user's stored choices, make sure it never ships in a production code path.

## Handle Consent Errors

Consent requests can fail, most commonly because the device is offline or no consent message is published for the user's region. The plugin reports every recoverable failure with a typed error code, so you can branch on the `ErrorCode` enum:

```typescript
import { Admob, ErrorCode } from '@capawesome-team/capacitor-admob';

const setupAds = async () => {
  try {
    const { canRequestAds } = await Admob.requestConsent();
    if (canRequestAds) {
      await Admob.initialize();
    }
  } catch (error) {
    if (error.code === ErrorCode.ConsentFormUnavailable) {
      console.log('No consent form is available for this user.');
    } else if (error.code === ErrorCode.ConsentRequestFailed) {
      console.log('The consent information could not be requested.');
    }
  }
};
```

Three error codes belong to the consent flow:

| Code | Meaning | Typical cause |
| --- | --- | --- |
| `CONSENT_FORM_UNAVAILABLE` | The consent form is not available. | No consent message is published for the user's region in the AdMob console. |
| `CONSENT_REQUEST_FAILED` | The consent information could not be requested. | The device is offline or the UMP service could not be reached. |
| `CONSENT_NOT_GATHERED` | Ads cannot be requested yet. | An ad load method was called before the consent requirements were met. |

In all of these cases, let your app continue without ads and try again on the next launch. A consent error is a monetization problem, and it should never block the user from using your app.

To get notified when we publish more guides like this one, subscribe to our newsletter:

[Subscribe to the Capawesome Newsletter](https://capawesome.io/newsletter/){ .md-button .md-button--primary }

## Conclusion

The entire GDPR consent handling for AdMob in a Capacitor app fits into a handful of calls: `requestConsent(...)` on every launch, `initialize(...)` once `canRequestAds` is `true`, a permanently visible privacy settings entry that calls `showPrivacyOptionsForm()`, and the App Tracking Transparency prompt in between on iOS. Everything else, from the consent form UI to the enforcement of Google's EU User Consent Policy, is handled by the plugin. For the full API, including banner, interstitial, rewarded, and app open ads, see the [Capacitor AdMob plugin](../../sdks/capacitor/admob.md) documentation.

If you have any questions, join the [Capawesome Discord server](https://discord.gg/VCXxSVjefW){:target="_blank"}, and subscribe to the [Capawesome newsletter](https://capawesome.io/newsletter/){:target="_blank"} to stay up to date on the latest news.
