How To Monetize Your App Using Admob

May 10 2018Written by Manektech Team

You have created Great App, now you want to make money from it. But you don't want to charge your customer, Then the best way to monetize your app is using the Ad Network.
And Admob is one of the best Ad Network available.

Basically, Admob provide 4 types of ad,

3.Rewarded Interstitial

In this tutorial, we will cover Banner Ad and Interstitial Ad.

The banner ad will be the small banner that will display on your mobile app screen at the place you want, And on click of Banner, it will display the Ad overlay. You can set the time interval for the add and get the user interaction event for the Banner

When in Interstitial Ad, It will display full screen when your app invokes it. Because of their larger size, interstitial ads require more bandwidth on average than traditional banners. So its recommended approach is to have apps load them in advance of when they will be displayed. This helps ensure that an ad is ready to go when the time comes to display one.

So that been said, We have to start Admob integration with creating an account for Admob, and add the first app to monetize.

Steps To Monetize The App

Step 1

Open the Google Admob website and click on Sign in. If you don't have account then click on Sign Up and then create new account.

Step 2

Once you are logged in click on the Monetize tab in top bar then click on the MONETIZE NEW APP.

Step 3

At this point Admob will collect multiple information from you to create the App Monetizationand provide the SDK for the app.First thing you have to do is provide information regarding your application, Like App name, Platform. You can also search the app if it's already uploaded, or you can select from the app you have already added in the system.

Step 4

Next thing in the line will be to select the type of Ad we want to create, And provide name for the Ad.
Also you need to select the which type of content you want to show in the Ad Banner,

For this tutorial we select both, and select Refresh Rate for the Ad. Setting small Refresh Rate will display multiple Ad, but use more network bandwidth.

You can also select different Text ad type, for this tutorial we are selecting STANDARD.
Admob will display how your Ad will display in the app, So in this step you can check the look and feel of your Ad.

Step 5

Once you completed the Step 4 admob will provide you AD UNIT ID, Save this for later us in app.
Next step will be to add FIREBASE ANALYTICS in app, Firebase analytics help you display the different kind of analytic and report on sessions, user demographics, revenue from in-app products, and a lot more will appear in the Firebase console, with no extra code required.

But in this tutorial we are not adding Firebase Analytics so we can skip this.

Step 6

Final step will be to download the Google Mobile Ads SDK and Check Integration guide.

Step 7

This is optional Step, If you want to add only Banner Ad in your app then skip step 7 and 8,
But in this tutorial we will also add INTERSTITIAL Ad in app, so we will follow step 1 to 3 again and select Interstitial this time.

In Interstitial Ad we have three type of Ad

For this tutorial we will select all the type, but you can select the option you need.
Select the Capping and provide Ad unit name.

Step 8

Admob will display the Ad unit ID, copy this for later use in App.

So now we have Admob Account setup, and our app is added for Monetizing.
We have Ad unit ID and Google Admob SDK, So the next step will be to integrate Admob SDK in app and provide Ad Unit ID to display the Ad.

For easy implementation of Google Admob you can use MTGoogleAdMob library,
Download the code from the Github.

Step To Include Admob SDK In App

Step 1

Create new project using the xcode.

Step 2

You have GoogleMobileAds.framework by following the above step, and you can find GoogleAdsMob.Swift file from the Github code, This is the Handler created to handle all Admob related task in your app. So drag and drop both this file in your project.

Step 3

Now add two button in your ViewController class, displayed as below image,
And Connect its Outlet and Methods.

Step 4

Now in GoogleAdsMob.swift page you need to provide your Ads Unit ID for Banner Ad and Interstitial Ad.
Admob provide two mode,
1.Test Mode
2.Live Mode

When your app is still under development then you must use test Ads Unit ID, As otherwise the click generated on the Live Admob Unit ID will create issue with Admob Monetization. And your account can be suspended, so only use Live Ads Unit ID when you upload your app on App Store or Play Store.


Step 5

Next step will be Initialization, Initialize the Google Admob in your AppDelegate file in Method DidFinishLaunchingWithOptions.


Step 6

Add the following code in your App Button’s Method

?Show Interstitial Ads

?Show Banner Ads

?Hide Banner Ads

Step 7

Now run the app and you will see the following screen in your simulator,

If you have selected the Test Mode and you click on each button you will see Ads as follow,

It will display the Test Banner and Interstitial Ads

And if you add Live Ads Unit ID in your code then it will display actual ads,

Next step will be to check other Ads and integrate it, you can check more about it on the Admob documentation.

Feel free to ask any concern regarding Admob, kindly Contact Us to learn more about it.

Contact us

Here to Help ambitious people TRANSFORM the Digital Solutions!