Admob: Mobile Advertising

Having mobile apps integrated with Admob, InMobi, MobFox or any other mobile advertising networks to monetize your app, is a great way to increase your earnings. These platforms take advantage of the ever-growing possibilities of constant mobile access.

The role of mobile advertising APIs becomes more relevant in capturing publishers. Revenue opportunities and the potential for deep engagement grows every day. Additionally, networks are making their APIs simpler to implement than ever after.

This simplicity and the potential earnings associated with mobile advertising is one of the main reasons for being a mobile app developer. That is why mobile advertising is quickly becoming one of the most exciting and lucrative fields to be in.


Get Acquainted with Admob

Being the child of the behemoth Google, AdMob is probably the first advertising network for app developers to consider for monetization.

What makes it a worthy platform here is probably not its brand. It is the powerful integration of AdMob’s SDK (Software Development Kit) that helps you connect across different platforms such as iOS, Android and the rising Windows Phone.

Following Google’s strong commitment to customization, the SDK allows you to choose from a wide range of ad formats for both mobile devices and tablets, including standard banner ads, full screen (a.k.a. interstitial) ads, interactive ads, and so on.

Integration is far less painful with AdMob, as the documentation is clean and complete with recommendations for best practices and optimal results.

Phonegap/Cordova integration with AdMob

Although quite simple to use, AdMob’s SDK does not offer simple integration with Phonegap. Instead, the SDK is focused on native app integration and not WebView-based applications. And this is where Cordova plug-ins come into play.

After a rather quick search, I found a powerful Ad Plugin for Google AdMob and DFP integration. It’s called AdMob Plugin Pro and is freely available on Github.

Before adding ads to your mobile app, you need to create ads by entering the Admob portal. After that, you create your ads by following the site’s instructions. If you already have an Adsense account, it only takes a few clicks to enable AdMob on your account.

Adding the plug-in to your project depends on the tools you use to create and manage your project. For instance, if you use NetBeans (Cordova HTML5 project), you simply add the following line to your plugins.properties (inside /nbproject)

 

If you work with Cordova’s CLI toolset, you need to type (while being inside the project’s folder)

Displaying Ads on your Mobile App

Once added to your project, you can start configuring JavaScript to fetch and display ads on your app. The first step is to configure which ads the app should display, based on the platform your app runs on. If you build a multi-platform app, you can type:

Once you complete the ad configuration steps, you can display ads by entering something like the following example:

If you want to display an intersitial Ad instead, it’s even simpler. You only need to add the following:

Further configuration and ad-serving options

There are other options (you can check them out on the plug-in Github page) to enable further configuration options. Also, you can even take advantage of AdMob’s Mediation Network and serve ads from Facebook Audience Network, Flurry, iAd, InMobi, Millennial Media and MobFox (additional plug-ins required).

Summary
Admob: An effective way to monetize your Cordova/Phonegap App
Article Name
Admob: An effective way to monetize your Cordova/Phonegap App
Description
Having mobile apps integrated with Admob, InMobi, MobFox or any other mobile advertising networks to monetize your app, is a great way to increase your earnings
Author
Publisher Name
Iván Melgrati
Publisher Logo