Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:all-features:admob [2019/11/10 12:25]
sushant098123 AdMob In G Develope 5
gdevelop5:all-features:admob [2021/11/22 23:06] (current)
Line 1: Line 1:
-{{youtube>4ZaJb_A2UJE?medium}} 
 # Integrating ads using Google AdMob # Integrating ads using Google AdMob
  
Line 12: Line 11:
 To get started, go to [[https://www.google.com/admob/|AdMob website]] and create an account. Once that is done, you can create a new app and an ad unit. To get started, go to [[https://www.google.com/admob/|AdMob website]] and create an account. Once that is done, you can create a new app and an ad unit.
  
-  * Click on ''Apps" then "Add App" in the left menu".+Click on ''Apps" then "Add App" in the left menu".
  
 {{ :gdevelop5:all-features:admob-left-menu-add-app.png?nolink |}} {{ :gdevelop5:all-features:admob-left-menu-add-app.png?nolink |}}
  
-Add your application by entering its name and choosing its platform. If your game is for both iOS and Android, you must register two ad units.+Add your application by entering its name and choosing its platform. If your game is for both iOS and Android, you must register two ad units.
  
 When created, your **app id** will be displayed. When created, your **app id** will be displayed.
Line 22: Line 21:
 {{ :gdevelop5:all-features:admob-app-created.png?nolink |}} {{ :gdevelop5:all-features:admob-app-created.png?nolink |}}
  
-Next, choose if the ad unit will be a banner, an interstitial screen or a reward video.+Next, choose if the ad unit will be a banner, an interstitial screen or a reward video.
  
 {{ :gdevelop5:all-features:admob-choose-ads-type.png?nolink |}} {{ :gdevelop5:all-features:admob-choose-ads-type.png?nolink |}}
  
-Enter the name for this ad unit and click on "Create Ad Unit".+Enter the name for this ad unit and click on "Create Ad Unit".
  
 {{ :gdevelop5:all-features:admob-banner-setup.png?nolink |}} {{ :gdevelop5:all-features:admob-banner-setup.png?nolink |}}
  
-You will now see the app id and the ad unit identifier.+You will now see the app id and the ad unit identifier.
  
 {{ :gdevelop5:all-features:admob-adunit-id.png?nolink |}} {{ :gdevelop5:all-features:admob-adunit-id.png?nolink |}}
  
 <note important>The first identifier is the **app id**. The second is the **ad unit identifier**. You need to know these identifiers to insert them in the game properties and actions parameters to display the ads. Copy them or leave the screen open. </note> <note important>The first identifier is the **app id**. The second is the **ad unit identifier**. You need to know these identifiers to insert them in the game properties and actions parameters to display the ads. Copy them or leave the screen open. </note>
 +
 ## Setup Payments in Admob ## Setup Payments in Admob
  
Line 47: Line 47:
 Ads should now be able to be shown. Ads should now be able to be shown.
  
-<note warning>It can take few hours (~4) for ads to show the first time. If ads are not showing, double check that you've entered all the necessary information in this page and that you properly configured your game (see next section).</note>+<note warning>It can take atleast few hours (~h24or days for ads to show the first time. If ads are not showing, double check that you've entered all the necessary information in this page and that you properly configured your game (see next section).</note> 
 + 
 +<note warning>When you accound is approved use the test mode for your test in local. If you use the production mode your account will be blocked because admob prohibits the use of advertisements on a local network. Use your 4G on phone or test mode. Your phone and computer should not be on the same network and the  Google account used on the Play Store must not be the same as the developer's account. In general, it is better to ask a friend to try the game.</note>
  
 ## Setting up your game  ## Setting up your game 
  
-Once you have created your AdMob account and have the app id and the ad unit identifier, open your game properties. Open the Project Manager, then click on Game settings and Properties.+Once you have created your AdMob account and have the app id and the ad unit identifier, open your game properties. Open the **Project Manager**, then click on Game settings and **Properties**. 
 + 
 +In the AdMob section, enter your **app id**, one for Android and one for iOS (though it might be the same).
  
-* At the bottom, enter your **app id**. 
 <note warning>The app id must be entered *without* quotes.</note> <note warning>The app id must be entered *without* quotes.</note>
  
-{{ :gdevelop5:all-features:admob-identifier.png?nolink |}}+{{:gdevelop5:all-features:admob:pasted:20210128-231626.png}}
  
 <note important>Do not confuse the *app id* and the *ad unit identifier*. The app id is the unique id for your app, while ad unit identifiers are different for each ad you're creating.</note> <note important>Do not confuse the *app id* and the *ad unit identifier*. The app id is the unique id for your app, while ad unit identifiers are different for each ad you're creating.</note>
Line 62: Line 65:
 ## Loading and displaying ads ## Loading and displaying ads
  
-Once your game is set up with the *app id*, you can add an event with an action to show the ad unit that you've created. All actions can be found inside the AdMob category:+Once your game is set up with the *app id*, you can add an event with an action to show the ad unit that you've created. All actions can be found inside the AdMob category:
  
-{{ :gdevelop5:all-features:admob-actions.png?nolink |}}+{{:gdevelop5:all-features:admob:pasted:20210131-221349.png}}
  
-Choose the action adapted to your ad unit. For example, if you created a banner, use the action to load a banner. +Choose the actions adapted to your ad unit:
  
-In the action, paste the **ad unit id** in the parametersBecause parameters are string expressions, you must put the ad unit identifier between quotes.+  If you created a **banner**, use the action to 1) *Configure the bannerand 2) *Show the banner* 
 +  * For **interstitials** and **rewarded videos**use the action to first load them (during the gameplay) and then the action to show them whenever you're ready (the player just finished a level for example).
  
-{{ :gdevelop5:all-features:admob-app-banner-id-action.png?nolink |}}+In the action, paste the **ad unit id** in the parameters (one for Android and one for iOS). Because parameters are string expressions, you must put the *ad unit identifier between quotes*.
  
-For example:+{{:gdevelop5:all-features:admob:pasted:20210131-221724.png}}
  
-{{ :gdevelop5:all-features:admob-setup-banner-display-action.png?nolink |}}+To display the ad as soon as it is ready, activate the corresponding option. It's only for interstitials and rewarded videos. Banners are loaded and shown when loaded automatically using the *Show banner* action.
  
-* To display the ad as soon as it is ready, set "**Display on Load complete**" to 'Yes'+Finally, while your account is not yet approved it is possible to view the space that the ad will take by activating the  "**Test Mode**". This will present a fake banner, interstitial or rewarded video - this is a great way to test your actions
-* To test your ads before publishing your game, set "**Test Mode**" to 'Yes'.+ 
 +For this, insert the action to enable the test mode at the beginning of your game
 + 
 +{{:gdevelop5:all-features:admob:pasted:20210131-221920.png}}
  
 ## Testing and publishing your game on Android (or iOS) ## Testing and publishing your game on Android (or iOS)
  
-You must first build your game for Android (or iOS) to have the ads displayed on the device. See **[[gdevelop5:publishing:android_and_ios|the page about Android and iOS publishing]]**.+You must first build your game for Android (or iOS) to have the ads displayed on your device. See **[[gdevelop5:publishing:android_and_ios|the page about Android and iOS publishing]]**.
  
 {{ :gdevelop5:all-features:export-android.png?nolink |}} {{ :gdevelop5:all-features:export-android.png?nolink |}}
Line 87: Line 94:
 The one-click packaging for Android service included with GDevelop is compatible with Admob, so no additional tooling or development kits are needed. The one-click packaging for Android service included with GDevelop is compatible with Admob, so no additional tooling or development kits are needed.
  
-<note>It may take a few days for the Admob service to provide ads to appear in your applicationespecially video content.</note>+In summary, before you launch your application with ads, you must: 
 + 
 +  * Your Admob account needs to be approved. 
 +  * Make sure to disable the test mode. 
 +  * Double check that you have set the **app id** (for Android and iOS)and the **ad unit identifiers** (for Android and iOS). 
 + 
 +Wait a few hours before seeing the first ads.
  
-<note important>Ads are not visible in preview, only in .apk</note>+<note important>Remember that ads are not visible in the previews run in GDevelop, only in the exported Android (or iOS) app. It may take a few days for the AdMob service to start providing ads in your application, especially for video content.</note>
  
 ## Example ## Example