Got Leadbolt ads working on Android (without lunarads)

I’ve managed to get leadbolt (my affliate link) ads working on my apps and so far i’ve seen a good increase in revenues over the various alternative networks. Their ECPM seems to be around $1 allthough I’ve seen a fair bit higher and somewhat lower on indvidual days.
The code I’ve been using is based around the admob code found on these forums.

So here’s the various bits of code needed to get leadbolt working
place the following in a file called ad.html and place inside the root of your aps folder

br\> "http://www.w3.org/TR/html4/loose.dtd"\>  
   
  
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">

<title>ad</title>
  
  
  
<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=your_app_id"></script>  
  
[/html]  

Replace your_app_id with your own leadbolt app id.

Then place the following 2 functions in your main.lua

function showAd(event)  
 if not string.find(event.url, "ad.html", 1, false) then  
 system.openURL(string.gsub (event.url, "Corona:", ""))  
 else  
 return true  
 end  
end  
  
function adSpace()  
 native.cancelWebPopup()  
 native.showWebPopup(0, 436, 322, 48, "ad.html", {baseUrl = system.ResourceDirectory, hasBackground = false, urlRequest = showAd})  
end  

Then just call adspace() to call the ads, I put it on a timer so

timer.performWithDelay(30000,adSpace,0) so that will refresh the ads every 30 seconds, I’ve not noticed any slowdown in my aps, but obviously test, test, test.

Ap approval with leadbolt is straight forward, I upload my apps to my own host and get approval done on those before updating on the Android play market. I’ve also not seen any inappropriate ads, or had complaints of inappropriate ads, through android market reviews. Fill rates are unpublished but comparing ad counts with my own stats they seem to be pretty good, but either way I’m earning more money through leadbolt than any previous network, and I’ve tried all the usual suspects.

Full Disclaimer: I’m not connected to leadbolt in anyway, but the link above is my referal code, using this link won’t affect your revenues in anyway, but I do get rewarded, so if you do signup up using my link I would be very grateful.
[import]uid: 36590 topic_id: 27261 reply_id: 327261[/import]

Why would you want to use this rather than https://LunarAds.com? LunarAds is free and you get to mediate other ad networks you choose at any time. Plus you can cross promote your apps and use real-time analytics.

Lunar also supports Leadbolt Appwalls, and other Leadbolt formats - not just banners…

Just trying to understand why the work around?
We have many developers successfully using the LunarAds system now, including the makers of Cannon Cat and Tiny Monsters.

Let me know how I can help,
Richard
[import]uid: 9046 topic_id: 27261 reply_id: 110869[/import]

Firstly LunarAds isn’t really free, you take 5% of traffic, so while you don’t actually pay, you potentially earn 5% less. For me this is potentially $50 a month.

Secondly, I found the performance of my faster moving apps to really suffer, it would literally freeze for a second or so, when switching ads. I had to switch my ad refresh rate to 5 minutes so it wasn’t killing the perfomance of my game, this was a bit of killer for me. I notice others on the forum have noticed this.

And finally I found that by simply hitting the androids back button after my game loaded would kill the ads for the whole of the session, I probably could have hacked around this, but decided to roll my own solution instead.

So whilst I admire the work your doing with LunarAds, it wasn’t for me. [import]uid: 36590 topic_id: 27261 reply_id: 110880[/import]

I understand. Sorry it didn’t work for you. We are always trying to improve the network so keep us in mind when you want more ad and revenue options for your apps.

The only comment I’ll make regarding the performance delay you are experiencing is we only perform a “pass-through” for the networks, so a delay in response from Leadbolt should be the same from your solution (statically embedding) to using LunarAds to display the ads.

Richard
[import]uid: 9046 topic_id: 27261 reply_id: 110881[/import]

This is great. Thanks.

Any reason why this wouldn’t work in iOS? I’ve tried, and the web popup appears with the timer and then disappears immediately. [import]uid: 141982 topic_id: 27261 reply_id: 125844[/import]

I would highly recommend you use the LunarAds SDK. We are Leadbolt partners and are consistently seeing over $10 eCPM’s inside the network when using it through LunarAds. Plus you’ll get to control the ads anytime through our website.
Our latest SDK is rock solid and very fast, all of the delay problems have been resolved and we have some great testimonials from developers using our cross promotion.

[import]uid: 9046 topic_id: 27261 reply_id: 125847[/import]

This is great. Thanks.

Any reason why this wouldn’t work in iOS? I’ve tried, and the web popup appears with the timer and then disappears immediately. [import]uid: 141982 topic_id: 27261 reply_id: 125844[/import]

I would highly recommend you use the LunarAds SDK. We are Leadbolt partners and are consistently seeing over $10 eCPM’s inside the network when using it through LunarAds. Plus you’ll get to control the ads anytime through our website.
Our latest SDK is rock solid and very fast, all of the delay problems have been resolved and we have some great testimonials from developers using our cross promotion.

[import]uid: 9046 topic_id: 27261 reply_id: 125847[/import]

not just banners??.. dude I ve seen lunarsads and they only support walls and banners from leadbolt…
also its super laggy to the game…
gg [import]uid: 208416 topic_id: 27261 reply_id: 136530[/import]

@ alonsoorivera - Which version of LunarAds SDK did you try? Did you use webpopup, or webview? LunarAds SDK supports both, and the latest SDK is super fast.

Also, we support Leadbolt banners, Leadbolt Interstitials, Pontiflex banners and Interstitials, Tap It, Inneractive, and much more - and of course cross-promotion ads ad well.

What is even more is that you can now use any ad network you want with LunarAds, check here for all the details there http://support.lunarads.com/KB/a14/using-mobile-affiliate-offers-with-lunarads.aspx

Richard
[import]uid: 9046 topic_id: 27261 reply_id: 136533[/import]

I use the last version… downloaded yestarday and try it out,
I used webpopup and had some lag issues…
the thing is that banners and wall are not that popular now…
I preffer using audio or splash screens… and with lunarads I cant…
as far as I know.
im really new to this ads thing… so I just want to find the easist way to add this to my apps
im still looking for… [import]uid: 208416 topic_id: 27261 reply_id: 136597[/import]

Hi Richard
is there any way that I can contact you? like skype or facebook
to help me out with a couple of thing in lunarads.
thanks,

Guillermo [import]uid: 176165 topic_id: 27261 reply_id: 136609[/import]

not just banners??.. dude I ve seen lunarsads and they only support walls and banners from leadbolt…
also its super laggy to the game…
gg [import]uid: 208416 topic_id: 27261 reply_id: 136530[/import]

@ alonsoorivera - Which version of LunarAds SDK did you try? Did you use webpopup, or webview? LunarAds SDK supports both, and the latest SDK is super fast.

Also, we support Leadbolt banners, Leadbolt Interstitials, Pontiflex banners and Interstitials, Tap It, Inneractive, and much more - and of course cross-promotion ads ad well.

What is even more is that you can now use any ad network you want with LunarAds, check here for all the details there http://support.lunarads.com/KB/a14/using-mobile-affiliate-offers-with-lunarads.aspx

Richard
[import]uid: 9046 topic_id: 27261 reply_id: 136533[/import]

I use the last version… downloaded yestarday and try it out,
I used webpopup and had some lag issues…
the thing is that banners and wall are not that popular now…
I preffer using audio or splash screens… and with lunarads I cant…
as far as I know.
im really new to this ads thing… so I just want to find the easist way to add this to my apps
im still looking for… [import]uid: 208416 topic_id: 27261 reply_id: 136597[/import]

Hi Richard
is there any way that I can contact you? like skype or facebook
to help me out with a couple of thing in lunarads.
thanks,

Guillermo [import]uid: 176165 topic_id: 27261 reply_id: 136609[/import]

You bet guys, please contact me direct at richard AT lunarads DOT com

I will make sure each and every issue gets resolved personally :slight_smile:

Richard

[import]uid: 9046 topic_id: 27261 reply_id: 137103[/import]

You bet guys, please contact me direct at richard AT lunarads DOT com

I will make sure each and every issue gets resolved personally :slight_smile:

Richard

[import]uid: 9046 topic_id: 27261 reply_id: 137103[/import]

You said Lunarads support Leadbolt interstitial ads, but when i try to setup lunarads for leadbolt interstitial ads, there is none only wall and banner.

Did you know leadbolt has support for Corona ?

I have implemented their solution and it works.