Monetizing Your PhoneGap Build App with AdMob

Monetizing Your PhoneGap Build App with AdMob

With the newest modifications to PhoneGap Build we now have entry to utilize all plugins that are listed on along with the plugins on the PhoneGap Build website online. This signifies that we now have entry to the AdMob plugins, which is ready to allow us to mix AdMob with PhoneGap Build functions.

AdMob will will allow you to present commercials to prospects of your cell utility, and earn revenue from displaying them – identical to how AdSense works for websites. This is a fairly widespread monetisation approach for cell functions, video video games notably. With ample prospects it might usher in a giant amount of revenue. It moreover ties in correctly with an in app purchase that offers to remove commercials from the making use of if the particular person needs an advert free experience – that’s moreover a fairly widespread monetisation approach.

AdMob vs iAd for PhoneGap Applications

AdMob is Googles reply for cell commercials, iAd is Apples reply. We can use each, nevertheless which should we choose? What are the variations?

You can use every actually, using one as a fallback for the other if no commercials might be discovered. However, builders have reported not too way back that they are receiving bigger fill costs and revenue for clicks with the AdMob platform.

Stack Overflow particular person Luc Wollants, giving advice to somebody on this topic, stated that:

the fill value for iAd is spherical 30% and for Admob spherical 95%

The most interesting technique is on a regular basis going to be using a mixture of every, and there’s some strategies on simple strategies to technique that, nevertheless on this tutorial we’re going to merely be establishing AdMob.

What’s the excellence between Interstitial and Banners adverts?

There are two kinds of commercials you presumably can create with AdMob, which can be:

  • Interstitial adverts
  • Banner adverts

Interstitial adverts are these ones that pop up and take up all the show display screen (annoying! nevertheless environment friendly). As an occasion in a cell sport I’m creating I create an interstitial advert each time the participant will get to the game over show display screen – you undoubtedly want to make sure you don’t present an interstitial advert whereas an individual is within the midst of a sport most frequently!

Banners adverts are seen regularly (besides you disguise them actually). Typically these are positioned as a small rectangular banner each on the excessive or bottom of the making use of.

Before getting started with AdMob you will have to create an AdMob account with Google. An AdMob account would require a Google account, along with every an AdSense and AdPhrases account. If you should not have these accounts already then you definately presumably can create all of them throughout the strategy of signing up for AdMob (no should go register for them individually beforehand).

You may wish to create the sort of business you want to use in your AdMob administration panel. If you want to use every interstitial and banner adverts then you definately’ll have to create and configure these individually.

  • Click ’Monetize New App’ and create your utility
  • Create every an Intertitial and Banner advert by clicking ’New advert unit

Adding Ads to Your Application

Now it’s time to get all the way in which right down to some coding. First, you will have to make the efficiency obtainable inside your utility by collectively with the plugin in your config.xml file:

<gap:plugin establish="com.admob.plugin" mannequin="3.0.0" provide="" />

There are a variety of selections, nevertheless we are going to most likely be using this plugin. After that there’s some configuration that ought to occur throughout the utility.

1. Configure AdMob as quickly because the system is ready

You may wish to add the subsequent code to your utility, after the system ready event has fired:

Make optimistic to interchange the ID’s above with your private out of your AdMob administration panel.

2. Prepare an Interstitial Ad

If you want to use an Interstitial advert, moreover, you’ll should cache that beforehand, you’ll be able to try this with the subsequent code:

3. Show a Banner Ad

Displaying a banner advert is a straightforward one liner, which can be achieved with the subsequent:

The second parameter takes throughout the place of your banner advert, on this case we’re inserting the advert on the bottom of the making use of, which is ready to look one factor like this:

AdMob Advert

You might also change the second parameter to **admob.Position.TOP_APP **to place the banner on the excessive of your utility as an alternative. You could place banner commercials utterly using the subsequent code as an alternative:

4. Show an Interstitial Ad

It is equally easy to set off an Interstitial advert:


Taking it extra

This tutorial covers the basics of this AdMob plugin, and achieves a fairly widespread organize for commercials in cell functions – a unbroken banner view along with pop up adverts at certain situations. There is further to this plugin to find though that I haven’t touched on however.

There are selections to specify configuration settings to your adverts (equivalent to setting a testing flag or setting key phrases), nevertheless most notably the plugin moreover gives a complete bunch of events. These events might be utilized to modify the behaviour of your commercials based mostly totally on whether or not or not adverts might be discovered and what your particular person is doing. Events obtainable embrace:

  • onAdmobBannerDismiss
  • onAdmobBannerFailedReceive
  • onAdmobBannerDepartApplication
  • onAdmobBannerPresent
  • onAdmobBannerGet hold of
  • onAdmobInterstitialDismiss
  • onAdmobInterstitialFailedReceive
  • onAdmobInterstitialDepartApplication
  • onAdmobInterstitialPresent
  • onAdmobInterstitialGet hold of

You may want to hook into the **onAdmobInterstititalReceive **to indicate an business as shortly because it’s ready as an illustration. There’s a lot you’ll be able to do to make your business monetisation approach _really wise _but we are going to most likely be leaving it at that for this tutorial. If you want to start diving deeper into this AdMob plugin then you definately presumably can study the documentation on GitHub.

If you’ve used AdMob or iAd before now it’d be good to hearken to about your experiences with them, so be comfortable to go away  a comment below!

Share This


Wordpress (0)