📖 SETUP GUIDE

AdMob Plugin for
Godot 4.4 — Full Setup

Banner, Interstitial, Rewarded, Rewarded Interstitial & App Open Ads. With Unity Mediation support. Step-by-step guide based on the actual plugin code.

Start Setup →
5AD TYPES
7SETUP STEPS
$4ONE-TIME
4.4+GODOT VERSION
1

Installation

What you get from itch.io

After purchasing, download addons.zip — extract and copy the addons/ folder into the root of your Godot project.

res:// ├── addons/ │ └── admob/ │ ├── admob.gd ← main wrapper (autoloaded as AdMob) │ ├── export_plugin.gd ← handles AAR + dependency injection │ └── plugin/ │ └── admobplugin-release.aar ├── android/ ├── scenes/ └── project.godot
ℹ️
The addons/admob/ folder must be at the project root. Do not rename the folder — the plugin path is hardcoded in export_plugin.gd.

Enable the Plugin

  1. Open your project in Godot 4.4
  2. Go to Project → Project Settings → Plugins
  3. Find AdMob in the list and toggle it ON
  4. Godot automatically adds AdMob as a global autoload singleton
🖼️

Screenshot: Project Settings → Plugins → AdMob enabled

Verify it worked: After enabling, open any script and type AdMob. — autocomplete should show all methods.
2

Install Android Build Templates

🚨
Do this before Step 3. The android/build/ folder — including AndroidManifest.xml — does not exist until you install the build templates. Without this, you cannot configure your AdMob App ID.
  1. Go to Project → Install Android Build Template…
  2. Click Install — Godot downloads and extracts the template
  3. After installation, confirm the folder exists: android/build/AndroidManifest.xml
🖼️

Screenshot: Project → Install Android Build Template menu item

3

Add Your AdMob App ID

Edit AndroidManifest.xml

Open android/build/AndroidManifest.xml in any text editor. Find the <application> tag and add the following <meta-data> block inside it:

android/build/AndroidManifest.xml
<application android:label="@string/godot_project_name_string" ...>

    <!-- ADD THIS BLOCK inside <application> -->
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX"/>

</application>
⚠️
Replace ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX with your actual AdMob App ID from your AdMob dashboard. This is NOT your ad unit ID — it's the App ID (the one with the tilde ~ character).
🖼️

Screenshot: AndroidManifest.xml open in editor showing the meta-data block location

🖼️

Screenshot: AdMob dashboard → App → App ID location

4

Export Settings

🚨
Two critical rules — ignore these and ads will never work:

1. You must use a Release Keystore. Debug keystore does not work with AdMob.

2. You must Export as Release APK. Do NOT use One-Click Deploy.

Android Export Preset — Required Settings

Project → Export → Android Preset
── Gradle Build ─────────────────────────────
[✓] Use Gradle Build
[✓] Use Custom Build

── Permissions ──────────────────────────────
[✓] INTERNET
[✓] ACCESS_NETWORK_STATE

── Keystore (REQUIRED for real ads) ─────────
Release Keystore:  path/to/your-release.keystore
Release User:      your_key_alias
Release Password:  your_password

── Export ────────────────────────────────────
Export Format:  APK  ← use Export button, NOT one-click deploy
Build Mode:     Release
🖼️

Screenshot: Export dialog with Gradle Build enabled and permissions checked

ℹ️
To export: go to Project → Export, select your Android preset, and click "Export Project". Choose Release mode. This is different from the play button (one-click deploy) which uses debug mode.
5

Using the Ads

5 Ad Types Available

📌

Banner

Top or bottom strip. Load once, show/hide as needed.

🖥️

Interstitial

Full-screen. Show between levels or scene changes.

🎁

Rewarded

Video with reward. Player opts in for coins, lives etc.

🎬

Rewarded Interstitial

Full-screen rewarded. Auto-shown at natural breaks.

🚀

App Open

Shown on launch. Auto-loads on plugin init.

Test Ad Unit IDs — Always use during development

Ad TypeTest ID
Bannerca-app-pub-3940256099942544/6300978111
Interstitialca-app-pub-3940256099942544/1033173712
Rewardedca-app-pub-3940256099942544/5224354917
Rewarded Interstitialca-app-pub-3940256099942544/5354046379
App Openca-app-pub-3940256099942544/9257395921
⚠️
Test IDs are pre-configured inside admob.gd. Just call AdMob.initialize() and it works in development. Swap to your real AdMob IDs only when building your release APK.

Call Order — Always load before show

🚨
Rule: Every ad type requires load_*() before show_*(). Calling show before load = nothing happens, no error.
autoload/game_manager.gd — complete example
extends Node

func _ready():
    # 1. Set your production Ad Unit IDs (swap from test IDs)
    AdMob.set_banner_ad_unit("ca-app-pub-XXXX/XXXX")
    AdMob.set_interstitial_ad_unit("ca-app-pub-XXXX/XXXX")
    AdMob.set_rewarded_ad_unit("ca-app-pub-XXXX/XXXX")
    AdMob.set_rewarded_interstitial_ad_unit("ca-app-pub-XXXX/XXXX")
    AdMob.set_app_open_ad_unit("ca-app-pub-XXXX/XXXX")

    # 2. Initialize — must come after setting ad units
    AdMob.initialize()

    # 3. Preload all ads
    AdMob.load_banner("bottom")       # "top" or "bottom"
    AdMob.load_interstitial()
    AdMob.load_rewarded()
    AdMob.load_rewarded_interstitial()
    AdMob.load_app_open()             # auto-called by plugin on init

    # 4. Connect signals
    AdMob.connect("interstitial_closed", _on_interstitial_closed)
    AdMob.connect("rewarded_interstitial_earned", _on_reward_earned)

# ── Banner ──────────────────────────────────────────────────
func show_banner():
    AdMob.show_banner()

func hide_banner():
    AdMob.hide_banner()

# ── Interstitial (between levels) ───────────────────────────
func on_level_complete():
    if AdMob.is_interstitial_loaded():
        AdMob.show_interstitial()
        # wait for interstitial_closed signal before changing scene
    else:
        change_scene()

func _on_interstitial_closed():
    AdMob.load_interstitial()   # reload immediately for next time
    change_scene()

# ── Rewarded (revive / coins) ────────────────────────────────
func offer_revive():
    if AdMob.is_rewarded_loaded():
        AdMob.show_rewarded()
    else:
        print("Rewarded not ready yet")

# ── Rewarded Interstitial ────────────────────────────────────
func _on_reward_earned():
    give_player_reward()
    AdMob.load_rewarded_interstitial()  # reload for next

Switching to Production IDs

When building your release APK, swap the test IDs with your real ones from the AdMob dashboard. Best practice is to use a config approach:

autoload/ad_config.gd
extends Node

# Returns test IDs in debug, real IDs in release
static func banner_id() -> String:
    if OS.is_debug_build():
        return "ca-app-pub-3940256099942544/6300978111"
    return "ca-app-pub-YOURREAL/BANNERID"

static func interstitial_id() -> String:
    if OS.is_debug_build():
        return "ca-app-pub-3940256099942544/1033173712"
    return "ca-app-pub-YOURREAL/INTERSTITIALID"

static func rewarded_id() -> String:
    if OS.is_debug_build():
        return "ca-app-pub-3940256099942544/5224354917"
    return "ca-app-pub-YOURREAL/REWARDEDID"
6

Mediation Setup

What is Mediation?

Mediation lets AdMob automatically pick the highest-paying ad network for each impression. Instead of only showing Google ads, it runs a real-time auction across multiple networks — increasing your fill rate and revenue.

No extra plugin code required. This plugin supports all AdMob mediation networks. The entire mediation configuration is done inside your AdMob dashboard — your Godot project needs zero changes.

Supported Networks via AdMob Mediation

Unity Ads

How to Set Up Mediation (AdMob Dashboard)

  1. Open admob.google.com and go to your app
  2. Click Mediation → Create mediation group
  3. Select your ad format (Interstitial / Rewarded / Banner)
  4. Add ad sources — pick Unity Ads, Meta, AppLovin etc.
  5. Enter each network's ad unit IDs (from their dashboards)
  6. Save — AdMob handles the waterfall/bidding automatically
🖼️

Screenshot: AdMob Mediation dashboard — Create mediation group

ℹ️
Some networks like Unity Ads require you to also add their SDK as a Gradle dependency. Check the AdMob mediation documentation for each specific network's additional requirements.
7

Debugging & Common Issues

⚠️
Before debugging: Make sure you have exported a Release APK (not one-click deploy), used a Release Keystore, and installed it on a real Android device (not emulator).

Step-by-Step Diagnostic — Ads Not Showing

STEPWHAT TO CHECK
ST 1
Correct method
Check you are using the right method from the singleton.
AdMob is a global autoload — call AdMob.show_banner() not admob.show_banner(). Also confirm load_*() was called before show_*().
ST 2
AdMob stats
AdMob takes time to serve real ads.
Open your AdMob dashboard → Reports. Check if ad requests are being received. If requests show but fill rate is 0%, your account may be pending review or your app isn't verified yet.
ST 3
Play Store listing
Your app must be listed on the Play Store to serve real ads.
AdMob verifies your app through the store listing. Apps distributed only via direct APK may not pass verification. Publish to at least internal testing on Play Store to enable full ad serving.
ST 4
Firebase Analytics
Set up Firebase Analytics linked to your AdMob app.
Link your AdMob app to Firebase in the AdMob dashboard under App Settings. Firebase analytics helps AdMob verify your app and improves ad targeting, which increases fill rate and eCPM.

Common Error Reference

SYMPTOMCAUSE & FIX
AdMob singleton not found Plugin not enabled — Go to Project Settings → Plugins and enable AdMob. Also confirm the addons/admob/ folder is in your project root.
App crashes on launch Missing AndroidManifest meta-data — AdMob requires the App ID <meta-data> block in AndroidManifest.xml. Without it the app crashes on Android 9+.
Ads show in debug but not release Test IDs used in release build — Replace all test IDs with your real AdMob ad unit IDs before exporting release APK.
Ads never load (no error) Debug keystore used — Export using your release keystore. Debug-signed APKs cannot load real AdMob ads.
Gradle build fails Gradle or permissions not enabled — In Export settings, enable "Use Gradle Build" and check INTERNET + ACCESS_NETWORK_STATE permissions.
Banner not visible show_banner() called before load_banner() — Always call load_banner("bottom") first, then show_banner() after it's loaded.
Interstitial shows, then scene doesn't change Not waiting for signal — Connect to AdMob.interstitial_closed signal before changing scenes. Change scene inside the signal handler.

Logcat — Reading Android Logs

Terminal — filter AdMob logs
# Connect your device via USB, then:
adb logcat | grep -i admob
adb logcat | grep -i "Ads"
adb logcat | grep -i "Godot"

# Look for these messages:
"AdMob plugin loaded with test ad units"      ← plugin found ✓
"AdMob plugin not found"                      ← plugin missing ✗

Get the Complete Plugin

Includes admob.gd, export_plugin.gd, the compiled AAR and all 5 ad types ready to use.

$4.00 Buy on itch.io →

One-time purchase · Instant download · Free updates