Google Ads Integration in Flutter — A Complete Guide

Google Ads Integration in Flutter — A Complete Guide

Published: 21 November 2025 · Category: Flutter · Author: Zeus Technocrats

This guide covers everything you need to integrate Google Mobile Ads (AdMob) into your Flutter app: setup, banner/interstitial/rewarded ads, testing, GDPR/consent, mediation, best practices and troubleshooting.

Overview

Google Mobile Ads (AdMob) is the official solution to monetize mobile apps with Google Ads. In Flutter, Google provides the google_mobile_ads plugin which abstracts platform-specific SDKs for Android and iOS. This guide explains how to integrate, test, and optimize ads in production-ready Flutter apps.

Setup & prerequisites

  1. Have a Flutter project ready (Flutter SDK & latest stable channel).
  2. Create an AdMob account at admob.google.com and register your app.
  3. Obtain your App ID for Android & iOS from AdMob.
  4. Use official plugin: google_mobile_ads.

Install the plugin

flutter pub add google_mobile_ads

Android specific

Open android/app/src/main/AndroidManifest.xml and add your AdMob App ID inside the <application> tag (only required for older SDKs — recent plugin versions set it automatically; check docs):

<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
           android:value="ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY"/>

iOS specific

Open ios/Runner/Info.plist and add:

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY</string>

Initialization & app lifecycle

Initialize the SDK as early as possible in your app, usually in main() before running the app.

import 'package:google_mobile_ads/google_mobile_ads.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  MobileAds.instance.initialize().then((InitializationStatus status) {
    runApp(const MyApp());
  });
}

The initialize() call returns an InitializationStatus you can inspect for diagnostics.