Get Started
Integrating the AdMob plugin into your Godot project, specifically for Godot v4.1+, is the initial and crucial step in enabling ad displays and revenue generation. After successfully incorporating this plugin, you'll have the flexibility to select from various ad formats, like Banner or Interstitial, and proceed with the necessary implementation steps.
This document is based on:
Prerequisites
- Use Godot v4.1 or higher
- Deploy Android:- minSdkVersionof 19 or higher
- compileSdkVersionof 28 or higher
 
- Deploy iOS:- Use Xcode 14.1 or higher
- Target iOS 11.0 or higher
- CocoaPods
 
- Recommended: Create an AdMob account and register an app.
Download the Godot AdMob Plugin from Poing Studios
The Godot AdMob Plugin from Poing Studios simplifies the process for Godot developers to incorporate Google Mobile Ads into their Android and iOS apps, eliminating the need to write Java/Kotlin or Objective-C++ code. Instead, this plugin offers a GDScript-based interface for ad requests, which can be seamlessly integrated into your Godot project.
To access the plugin, you can either download the Godot package provided or explore its source code on GitHub through the links below.
Download from GitHub Download from AssetLibrary Source Code
Importing the Godot AdMob Plugin on Project
The AdMob plugin for Godot is conveniently available via AssetLib. To import this plugin into your Godot project, follow these steps:
- Open your Godot project.
- Navigate to AssetLib within the Godot editor.
- In the search bar, enter AdMoband ensure that the publisher is set topoing.studios. 
- Locate the AdMob plugin and click the Downloadbutton.
- Once the download is complete, go to Project > Project Settingswithin the Godot editor.
- In the Pluginssection, find theAdMobplugin and activate it. 
- With these steps, you'll have successfully integrated the AdMob plugin into your Godot project without the need for additional manual file imports.
Obtaining external libraries
To integrate the required Android library for AdMob in Godot, follow these steps:
- In Godot, navigate to Project > Tools > AdMob Download Manager > Android > LatestVersion.
- This action will download the appropriate Android library into your project, which is located at res://addons/admob/downloads/android/.
If you encounter any issues with the download, you can try downloading the library manually by clicking here.
To integrate the required iOS library for AdMob in Godot, follow these steps:
- In Godot, navigate to Project > Tools > AdMob Download Manager > iOS > LatestVersion.
- This action will download the appropriate iOS library into your project, which is located at res://addons/admob/downloads/ios/.
If you encounter any issues with the download, you can try downloading the library manually by clicking here.
Installing
- Install the Android Build Template by navigating to Project > Install Android Build Template.
- Go to the directory res://android/plugins/and extract the contents of theadsfolder from the downloaded.ziplocated atres://addons/admob/downloads/android/. If you have Mediation, do the same formeta,adcolonyetc.... 
- Add your AdMob App ID to your app's res://android/build/AndroidManifest.xmlfile by adding a<meta-data>tag with namecom.google.android.gms.ads.APPLICATION_ID, as shown below. If you don't do this then you App will crash on start-up.3.1. Important — App ID vs Ad Unit ID<!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 --> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>- App ID (contains ~): used for app registration and manifest.
- Ad Unit ID (contains /): used to load specific ad formats (banner, rewarded, etc.).
 
- App ID (contains 
- When exporting your project, select Use Custom Buildand ensure thatAd Mobis enabled, If you have Mediation, also markAd Mob Meta,Ad Mob AdColonyetc... 
- Create the iOS Plugin folder if doesn't exists on res://ios/plugins/.
- Go to the directory res://ios/plugins/and extract the contents of theadsfolder from the downloaded.ziplocated atres://addons/admob/downloads/ios/. If you have Mediation, do the same formeta,adcolonyetc.... 
- Within res://ios/plugins/poing-godot-admob-ads.gdip, if you are using Mediation, locate theSKAdNetworkItemssection. Here, you can remove the comments associated with the Mediation Networks that you are using. 
- When exporting your project, update the GADApplicationIdentifierwith your AdMob App ID and and ensure thatAd Mobis enabled, If you have Mediation, also markAd Mob Meta,Ad Mob AdColonyetc... 4.1. Important — App ID vs Ad Unit ID 4.1. Important — App ID vs Ad Unit ID- App ID (contains ~): used for app registration and manifest.
- Ad Unit ID (contains /): used to load specific ad formats (banner, rewarded, etc.).
 
- App ID (contains 
- Once exported, go to {{ ios_xcode_export_folder }}/{{your_project_name}}/ios/plugins/poing-godot-admob/scripts/folder and open the terminal (must be inside this folder) and run these commands: 
- This will create for your a {{ your_project_name }}.xcworkspace(e.g.:AdMobAddon.xcworkspace) file on your{{ ios_xcode_export_folder }}, open this file.
- Go to the Target of your Application and them General -> Frameworks, Libraries, and Embedded Contentand add allPodsin section. 
- Select all Frameworks (⌘ + A) and put as Do Not Embed 
- Run the Game.
- If you are trying to run on Simulator and is not working read this.
Initialize the Google Mobile Ads SDK
Prior to loading ads, ensure that your application initializes the Google Mobile Ads SDK. You can accomplish this by calling MobileAds.initialize(). This function initializes the SDK and triggers a completion listener once the initialization process is finished, or if it exceeds a 30-second timeout. It's important to note that this initialization should occur only once, ideally during the app's launch phase.
If you are utilizing mediation, it's essential to wait for the completion handler to be called before proceeding with ad loading. This step ensures that all mediation adapters are properly initialized before ad requests are made.
Select an ad format
The Google Mobile Ads SDK is now successfully imported, and you are prepared to integrate an ad into your app. AdMob provides a variety of ad formats, allowing you to select the one that aligns best with your app's user experience.
Banner
 
  Banner ads are rectangular advertisements, consisting of either images or text, that are integrated into an app's layout. These ads remain on the screen while users engage with the app and can automatically refresh after a designated time interval. If you're new to mobile advertising, banner ads provide an excellent starting point for your ad implementation journey.
Interstitial
 
  Interstitial ads are expansive, full-screen advertisements that overlay an app's interface and persist until they are closed by the user. They are most effective when strategically placed during natural pauses in the app's execution, such as between levels of a game or immediately after the completion of a task.
Rewarded
 
  Rewarded video ads are immersive, full-screen video advertisements that provide users with the choice to watch them entirely. In return for their time and attention, users receive in-app rewards or benefits.
Rewarded Interstitial
 
  A Rewarded Interstitial is a specific form of incentivized ad format that allows you to provide rewards in exchange for ads that appear automatically during natural app transitions. Unlike regular rewarded ads, users are not obligated to actively opt in to view a Rewarded Interstitial; they are seamlessly integrated into the app experience.