Ad Mediator for Corona®: a native ad mediation module like adwhirl

Hi,

I just released my ad mediation module for fellow corona developers. It works very much like Adwhirl. You can use multiple ad networks together, give them priorities and share ratios, use your house ads and configure those options either inside your code or using a remote configuration file sitting in your web server.

Inmobi, inneractive, herewead (a turkish ad network by the way) is supported out of the box. I also implemented a simple houseads plugin to serve houseads.

Ad Mediator uses providers’ native http api interfaces (server to server apis) to request and fetch ads. If you want to extend this module with new networks, please copy admediator_inmobi.lua as a starting point and implement your request and parse logic.

I wish you all good fillrates :slight_smile:

Ad Mediator for Corona:
http://developer.anscamobile.com/code/ad-mediator-corona

Documentation:
https://github.com/deniza/Ad-Mediator-for-Corona/wiki/Documentation [import]uid: 11686 topic_id: 21955 reply_id: 321955[/import]

This is a great idea, I have been looking for something that can back fill ads for sometime now, I am sick of the low fill rates.

I am having some issues getting this working though, is there any special way I have to setup my ads with inmobi or inneractive to get them to work with this module?

I am using the sample you have included and just changed the key’s to my own and I can’t get inmobi or inneractive ads to show up. I can get the test inmobi to show up however, and what looks like the hereweads but nothing else.

Any ideas?

Thanks

-Clark [import]uid: 5786 topic_id: 21955 reply_id: 87981[/import]

have you disabled test mode for inmobi? sample application enables testmode (test=true) to serve test ads. for a couple of days inneractive just sends their own houseads. thats why you dont get any real ads from inneractive.

there is a good deal of documentation on the github wiki. i really recommend checking it out if you havent done yet.

cheers. [import]uid: 11686 topic_id: 21955 reply_id: 88020[/import]

Thanks for the response.

Yea I have disabled the test mode for inmobi. I have checked out the github wiki, where I got the example code, of which I haven’t changed any of the code except for my client keys for inmobi and inneractive (and disabled test mode for inmobi).

When I do this the only ads I see are from what I assume is hereweads as they aren’t in english.

When I set inneractive to weight 100 and inmobi to 0 to serve only if inneractive fails, I get no ads displaying at all. I also tried setting both of them to 50 and 50 and still nothing.

I’m using active key’s that I am currently using and serving ads with in my app, I just can’t seem to get it to work with this module.

Thanks for any help you can provide! [import]uid: 5786 topic_id: 21955 reply_id: 88126[/import]

Do you see any console error messages? What is your build number? May I ask you one more thing: Could you please run Charles http proxy (it has 30 days fully functional trial) and send me xml response messages from inmobi and inneractive servers? http://www.charlesproxy.com/

You could clearly see whats going on by using this little nifty tool by the way. [import]uid: 11686 topic_id: 21955 reply_id: 88182[/import]

Upon further examination it looks like my issue is only with inneractive ads. I got some inmobi ads to show up finally (just thought they weren’t working at first because they have such a low fill rate).

I still can’t get inneractive ads to show up though, which is strange because when running them outside this module my fill rate on those is pretty good.

I am not seeing any console errors and I am using the latest stable build, 2011.704.

How would you like me to send you the xml responses from charles?

Thanks again for your help.
[import]uid: 5786 topic_id: 21955 reply_id: 88200[/import]

hey, i just found a bug in inneractive plugin (incorrect user-agent) thats why you dont get any real ads from this network. I fixed it. Also I added some additional request parameters to inmobi plugin, which may have a positive effect.

The big thing is, latest version have admob support :slight_smile:

Could you please check it out from github and test sample app on your own device? I still can not get real inmobi ads but as my fillrate is very low, it may be normal… Event anscas inmobi sample did not display any ads. I am not 100% sure, and need your help :slight_smile:

Thank you. [import]uid: 11686 topic_id: 21955 reply_id: 88354[/import]

I can verify that I am seeing both inneractive and inmobi ads now. Can’t speak for the admob ads as I don’t use them anymore but the others are working great.

I did notice that the inneractive ads seem to caught off a couple pixels since they are usually 53px in height but that was easy enough to fix.

Thanks this works great!

-Clark [import]uid: 5786 topic_id: 21955 reply_id: 88514[/import]

First, a lot of thanks for your awesome Ad Mediator.

Second, I can see my Ads in Corona Simulator but nothing in my real devices. Can you help me?:

AdMediator.init(display.contentWidth \* 0.5 \* 0.45, 0, 60) AdMediator.addNetwork( { name = "admediator\_admob", weight = 75, backfillpriority = 1, networkParams = { publisherId = global.globalloading.adMobPublishId, appIdentifier = global.globalloading.adMobAppIdentifier, test = false, }, } ) AdMediator.addNetwork( { name = "admediator\_inneractive", weight = 25, backfillpriority = 2, networkParams = { clientKey = global.globalloading.inneractiveClientKey, test = false, }, } ) AdMediator.addNetwork( { name="admediator\_inmobi", weight = 0, backfillpriority = 3, networkParams = { clientKey = global.globalloading.inMobiAppID, test = false, }, } ) AdMediator.start() AdMediator.show() [import]uid: 41145 topic_id: 21955 reply_id: 90459[/import]

I guess you are testing on some android device, am i right? First of all please double check that you can run ansca’s networking samples correctly, especially Networking/AsynchHTTP and Networking/AsynchImageDownload… If I remember correctly, you should give some permissions to let it working right on android devices.

Your build.settings file should include INTERNET permission.

settings =  
{  
 androidPermissions =  
 {  
 "android.permission.INTERNET"  
 },  
}  

As I am developing this on an apple device I have forgotten to include above settings in sample config file. I am updating the sample configuration file right now. :slight_smile: … Please update this topic if you managed to run it properly. Thank you. [import]uid: 11686 topic_id: 21955 reply_id: 90464[/import]

Thanks Deniz.

Yes, Android devices and INTERNET permission ok, even I have data and clics in my stats, it shows me that sometimes Ads are visible, maybe not for me but others:
Yesterday stats:
AdMob: 22% fillrate and 0 clics
Inneractive: 87% fillrate and 8 clics
InMobi: without data

My permissions:
android.permission.VIBRATE,
android.permission.INTERNET,
android.permission.READ_PHONE_STATE,
android.permission.ACCESS_NETWORK_STAT
By the way, in Corona Simulator, after clicking in Ads the Ads dissapears, is it ok? [import]uid: 41145 topic_id: 21955 reply_id: 90497[/import]

hey, kam reported that he managed to run ad mediator on several devices including android. As i dont have any android devices i can not help you to debug your code further. In webpopup mode, ads may dissapear when clicked, but they should come back again when their refresh timeout reached. [import]uid: 11686 topic_id: 21955 reply_id: 90554[/import]

Hey Miguel your not the only one…I just tested on my android device for the first time and I’m not seeing any ads either, only my house ads. I also have internet permissions enabled in build.settings.

Which leads me to another question Deniz…on iOS I noticed that sometimes when I see my house ads come up its like they get “stuck” there and the refresh of ads stops after that and my house ad stays there for the remainder of the session, but if the house ads don’t come up I do seem the ads refreshing at my refresh rate, any reason for that?

Thanks,

-Clark [import]uid: 5786 topic_id: 21955 reply_id: 90664[/import]

@ bonesmalone133

Could you please send me your test code? I can not reproduce what your are saying.

I also recommend you to use Charles and watch out http request/responses from your applications. It also may be a good idea to look out “Console” output in XCode/Organizer app for relevant error messages.

Dont forget to change your devices proxy settings (preferences->WIFI->http proxy) before using Charles. You should set your development machines IP address and 8888 as proxy port number.
http://www.charlesproxy.com/ [import]uid: 11686 topic_id: 21955 reply_id: 90691[/import]

Hey guys, I think I found the bug and fixed it in latest version. Please update your code from github and give it a try.

Please keep in mind that; clicking on admob test ads will open nothing. You should disable test mode and use an active publisherId to get real ads. They will work.

[import]uid: 11686 topic_id: 21955 reply_id: 90771[/import]

Thanx Deniz, I’ll try out it ASAP.
[import]uid: 41145 topic_id: 21955 reply_id: 90933[/import]

I tested your module on Android with Admob and it working :))
It working only with test=false.
Probably don’t work your function enableAutomaticScalingOnIPAD on Android tablets (I tested on Samsung Galaxy Tab 10.1) because banners are very small. [import]uid: 50988 topic_id: 21955 reply_id: 91112[/import]

Yea it looks like I’m seeing ads on Android now too, at least for inneractive (and maybe inmobi) anyways.

I’m still getting some other strange issues, the one with the ads not refreshing when on house ads is one, and I’m also seeing an issue moving between scenes on android sometimes. It looks as if I’m having some conflict with this and director class I’m using because when I use the same exact code outside of my project using director I don’t see any issues.

Haven’t had time to test with charles but will try to sometime this week and report anything I find.

The other thing I noticed is that on Android you can use the “back” button to get rid of the ads but still use the application. I know you don’t have an Android device to test so I understand you not being able to help…but maybe anyone else testing this on Android could give their input? [import]uid: 5786 topic_id: 21955 reply_id: 91189[/import]

In case of Admob’s ads, is this method legal for Android game?

[import]uid: 9190 topic_id: 21955 reply_id: 92110[/import]

@khanh.dq

Google states that; you must use their own sdks. Current ad mediator implementation emulates exactly the same http request as generated by actual admob sdk code samples. But you cant be sure 100% all times.

And also google is well known for their immediate account shut down policy if they found any suspicious activity. Ad mediator is a far better alternative than any other admob hacks around.

There are no hidden or encryped calls in admob sdk as far as i inspected. So it looks very safe to use this mediator. But, you should use it at your own risk. I recommend everyone to watch http calls and responses for both ad mediator and official admob sdk samples. Remember, http://charlesproxy.com is your best friend.

Good luck :slight_smile: [import]uid: 11686 topic_id: 21955 reply_id: 92144[/import]