4.4 – Setting up the AdMob ad network

Setting up AdMob is a piece of cake! This tutorial will walk you through what all you need to configure to get AdMob showing ads in your game. AdMob can be used for the following ad types:

  • Banner
  • Interstitial
  • Reward video

1. Setup on the AdMob Side

Go to AdMob (https://admob.google.com/home/) to create your account or to sign in to your existing AdMob Account.

Once logged in, select the apps tab from the left side of the page, and click the “Add Your First App” button to create a new app.

Fill in the required info to create a new app, such as the app name, platform you’re publishing it to, whether or not it’s on an app store currently, etc.

After your app is created, you’ll need to create ad units. These are essentially the types of ads you want to show in your game. Click the “Add Ad Unit” button to get started.

Select one of the supported ad unit types (banner, interstitial, rewarded). For this example I’ve selected banner.

Fill in the required info for the ad unit type you selected, such as the name of the unit. Ignore the advanced settings for now (you can change them later if desired).

After creating the ad unit you’ll see a page with some ID’s you can copy (ignore those for now) or choose to create another ad unit. Continue creating ad units until you have all the ones you want for your game, then click done.

2. Setup in the GameSalad Project

You need to make sure that the ads are set up to be shown in your GameSalad project:

BANNER ADS

For banner ads you’ll need to use the “Show Banner” behavior in your project on the scenes you want the banner to show up. You can adjust whether the banner shows up on the top or bottom of the scene in this behavior.

REWARDS / INTERSTITIAL ADS

For interstitial and reward ads you’ll use either a change scene or pause game behavior with the dropdown set to the type of ad you’d like to show:

Change scene behavior configured for showing interstitial ad
Pause game behavior configured for showing reward ad

After you’ve got your behaviors set up to show ads, publish your game to your GameSalad portfolio for the last step configuration.

3. Setup on the GameSalad Publishing Page

Once your game is published and you’ve selected a platform (IOS, Android), it’s time to finish configuring AdMob so it works in your game. Make sure you’re logged in on the AdMob site, since you’ll need to copy/paste ID’s from there for the steps below.

First, select the services dropdown on the left side of the page, and select AdMob. We’re going to fill in the AdMob App ID first:

This can be found on the AdMob site, under the app settings section for your app. Click on the ID to copy it, and then paste it on your GameSalad publishing page in the AdMob App ID section.

Next you need to fill in the individual ad unit ID’s for each type of ad you’re showing. Those ID’s can be found on the ad units tab on the AdMob site:

Copy/paste those values over into your GameSalad publishing page in their respective fields underneath the AdMob App ID field.

Example of the fields filled in for just showing a banner ad:

Lastly, on the GameSalad publishing page, select the platform your publishing to and scroll down to the bottom of the page. You should see a lot of checkboxes for things you’re using in your app.

Make sure the AdMob boxes are checked for your specific ad types (interstitial for rewards or interstitial ads, banner for banner ads).

Testing on Your Device

Google provides test ID’s you can use for ad hoc testing on your mobile device. They can be found here:

IOS Test ID’s: https://developers.google.com/admob/ios/test-ads
Android Test ID’s: https://developers.google.com/admob/android/test-ads

For testing

  1. Replace your ID’s under the AdMob services tab with the test ID’s
  2. Toggle on AdMob Test Mode
  3. Generate your app/apk and install it on your mobile device

Note: Your device needs to be connected to the internet to see ads show up.