Fighting the Ad overlap


A cordova plugin that I am using renders ad that overlaps the webview.
Currently I’m only using the ad at the bottom of the screen, so I can use ionic’s footer to leave the blank space where ad will be displayed, so that no overlapping occurs.
However, I also plan to test out some cases in future where the ad is displayed between the status bar in android and the app header.

Is there anyway to effectively “reduce” the height available to the app? or to have a persistent element across all views that occupies the desired space where the ad is to be displayed?


I’m sorry but I can’t help you with that. I’m new to phonegap/cordova so using the occasion I’d like to ask you, if could you be so kind and point me out to a place where I can learn something more about implementing ads in cordova/phonegap/ionic app?


I’m using google admob for ads, there are plenty more services available like inmobi, MobFox, iAds, etc. I’d suggest you do some research before you select a ad network, since every one of them has their own advantages and disadvantages.

Following are the steps for integrating admob:

  1. create a google admob account
  2. get the admob plugin
  3. use the js code specified in the admob plugin readme to control and display ads

Also, you might want to set up google analytics (plugin) to know your audience better.
You would also need at least cordova 3.5, or phonegap 3.4 for the admob plugin to work.

Lastly, I’d recommend that you store your adId on your server and have your app request it each time rather than hard-coding it into your code. That’ll give you a lot more flexibility.

Good luck making money!


Thank you! If it is that easy why not try :slight_smile:


Its easy to get started, but once you see that money coming for real, you will want to optimize it so that you can get the most out of it. Don’t spend too much time on that now, go with the simple banner ads on bottom with footer enabled in ionic, that’s what I am doing for now. After a while, the analytics you set up should help you optimize it further.

That is why I started this thread, to see what else I can do except for the simple banner ads on the bottom.


I dont have free płace in my app footer so I thought about placing ads between items in a list that is created using ng_repeat. Unfortunately I dont even know if this is possib’e with lists like that. Another option is full screen ad at the app exit. This should be easy to doand I think its the least intrusive ad.

Btw. How many downloads/users are the limit of getting interesting data from analytics?



Using the plugin that I linked, you can only absolutely position the ad on the screen and it’ll overlap the webview. So no, its not possible to put it in a list or to treat it as an html element. All you can do is put the ad in a fixed spot and make sure that your app can work without that space, that’s what I did with footer.

Unfortunately, if you already have a footer, there arn’t many neat options.
One option is to position it directly above the footer. To make sure that your content isn’t overlapped by it, you will have to have a <div class='ad-space-filler'></div> on the bottom of each of your views, with its height same as the height of the ad banner.

App Exit ads are okay, I guess. Just remember : most ads are CPC (99.82% in my case), which means they pay you only when the user clicks the ad, and decide accordingly what you need to do.

Google analytics data, like any other empirical data, is fickle if the number of observations is low, and becomes more and more homogeneous as the number of observations increase. In short, the more the merrier. But you should start gaining a pretty good measure of whatever it is that you are analyzing after ~1000 observations. Let them accumulate for 10 days and you have ~10,000 observations, that’ll be better.