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

First off thanks for the awesome work you guys have done on this.

Second I think adMob stopped serving ads to me. They might have caught on. When I first used this class in my apps it worked great then a couple weeks after I noticed I was not getting revenue from admob. I did not do any updates to my apps or anything inbeteween that time. Just one day my revenue stops and I’m no longer seeing ads on my app. Yet I can still login to my admob account. Can anyone confirm this happening with them? [import]uid: 39088 topic_id: 21955 reply_id: 100288[/import]

I confirm. I now dont’t see any ads with deniz module. Few weeks ago ads are displayed correctly but not now :frowning: [import]uid: 50988 topic_id: 21955 reply_id: 100295[/import]

hi there,

I am using admob to backfill inmobi and inneractive since its first release. I have 40K daily admob ad requests with 95% fillrate. There does not seem any suspicious activity on my account but its better to get alerted.

I am looking forward to hear more status updates on this issue. thank you.

deniz. [import]uid: 11686 topic_id: 21955 reply_id: 100307[/import]

Hi folks,

It seems like whatismyip.org is not working anymore. It stopped serving plain text ip address data. Inmobi uses this IP address as a request parameter, and now all your inmobi requests contain some garbage data instead of IP address. This sure will be a problem on the long run. My tests show that inmobi is still serving ads correctly but we can not guarantee that this will work forever.

SOLUTION: You should implement your own ip address fetching script. I disabled the code on github which uses whatismyip.org. Please update your apps as soon as possible.

Sample ip address script for php:

[php]

<?php
echo $\_SERVER["REMOTE\_ADDR"]; ?\> [/php] Save this script on your web server as getip.php. And request it from findClientIPAddress() function in admediator.lua. Regards. deniz. [import]uid: 11686 topic\_id: 21955 reply\_id: 102039[/import]

hi there, I already setup ad mediator for my application. The small (320x50) banners are working perfectly. But what I would have to do in order to display big or fullscreen banners; like the 300x250 banners for inmobi or the fullscreen ones for inneractive. I already tried adding the fs parameter for inneractive without any success. Also I already changed the slotSize variable from 9 to 10 but I’m receiving the same 320x50 banners.
Let me know if you have any suggestion. Thanks
[import]uid: 104813 topic_id: 21955 reply_id: 102192[/import]

Hi,

First of all, thanks deniz for this amazing code…
Second, I wanted to include fullscreen ads from inneractive as an option on the network params. It could be something like this:

[lua]AdMediator.addNetwork(
{
name=“admediator_inneractive”,
weight=25,
backfillpriority=3,
networkParams = {
clientKey=“YOUR_APPLICATION_TOKEN_FROM_INNERACTIVE”,
type=[banner or fullscreen or text]
},
}
)[/lua]

I was looking at the admediator_inneractive.lua and realized it is not that difficult, its just a matter of looking at charles proxy and updating the params, is it not?
(perhaps you tried this but it was far more difficult than just doing what i suggested, thats why i’m posting =D) [import]uid: 85172 topic_id: 21955 reply_id: 103279[/import]

@fabriciosn

hi, i can see the Admob display in simulator, but can’t display in my HTC device, do you have any suggestions?

regards,

raymond [import]uid: 22631 topic_id: 21955 reply_id: 103280[/import]

@fabriciosn

I suggest you to download inneractive’s Server API documentation from their site.You can find there indepth explanation of all the required (and optional) request parameters.

Ad mediator is using fixed sized (320x50) webpopups to display ads. If you want to display bigger ads (like fullscreen ads) you should also hack into admediator.lua and change webpopup size parameters. Good luck.

deniz. [import]uid: 11686 topic_id: 21955 reply_id: 103292[/import]

Client IP issue is RESOLVED!

After discussing recent client IP address requirement issue with inmobi engineers, it turned out that we do not need to provide client IP address in request body. (yeah, their documentation simply missed that point) I removed this requirement from inmobi plugin. You basically dont need to provide your own ip address resolution script anymore.

Please update your working copy from github.

PS: herewead network still requires this, but I guess this network is only used by me :slight_smile: [import]uid: 11686 topic_id: 21955 reply_id: 103517[/import]

For me it’s ok for Inneractive but I cann’t see AdMob. I don’t understand it because I have this week 10k requests of AdMob so why only 3 impresions (0 clicks)?

In AdMob reports, these 3 impressions were my “auto-ads” (It’s weird because I did nothing about House Ad Campaign) [import]uid: 41145 topic_id: 21955 reply_id: 105085[/import]

Admob is not working for me, using android. Admob is showing impressions, but 0% fill rate. Others are working fine. Do I need to change the code anywhere because I’m using android? [import]uid: 48372 topic_id: 21955 reply_id: 105859[/import]

I test in a Website my AdMob publishedId (used in my Corona game) in a Firefox navigator with a User Agent changer extension and:
* If Android User Agent: no AdMob showed!
* If iPhone User Agent: AdMob is always showed!!!

I guess it will be a cool idea be able to change the User Agent in my Corona projects. Is it posible??? [import]uid: 41145 topic_id: 21955 reply_id: 105955[/import]

Sure, you can change userAgent string easily. UA strings are defined in admediator.lua as:

local userAgentIOS = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4\_2 like Mac OS X; en) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F190 Safari/6533.18.5"  
local userAgentAndroid = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"  

I recommend editing admediator_admob.lua: line 24 and change UA string with whatever you want:

But, let me warn you: please double check that clicking on ads (especially ads targetting to google playstore) are working fine.

good luck.

deniz. [import]uid: 11686 topic_id: 21955 reply_id: 106033[/import]

It’s ok. And yes, it show Ads only for iOS so it’s not very usefull. [import]uid: 41145 topic_id: 21955 reply_id: 107395[/import]

Hi there,

We fixed admob plugin, so admob ads on android should be working again! Please pull the latest version from github.

Thanks for your support. [import]uid: 11686 topic_id: 21955 reply_id: 110817[/import]

@ deniz,

Thanks so much for effort, wonderful job!

[import]uid: 22631 topic_id: 21955 reply_id: 110819[/import]

hi deniz:
Is anybody using admediator with admob and disable admob account ?? [import]uid: 143797 topic_id: 21955 reply_id: 111842[/import]

I was wondering what the Issue was why the mediator class stopped working with admob and android a while back?

Also there were some ads that when pressed they would just disappear.

Thanks again for your work. [import]uid: 39088 topic_id: 21955 reply_id: 111950[/import]

I recommend all of you you to watch github repository. Thanks to some generous contributers, we are going to release updated code that should fix lots of android admob problems.

To note that; I have been using admob since ad mediators first release. I get about 45k daily impressions, and does not have any problem with my account. [import]uid: 11686 topic_id: 21955 reply_id: 111955[/import]

I’ve been trying to use admediator with admob on kindle fire. I have a version of admediator from github from a couple of days ago.

In general, it works, and makes a small (320x50) ad taking up about half the width of the screen.

However, for some ads clicking just makes the ad disappear (as has been mentioned a few times in this thread.) I have not seen anyone mention the error message though.

I/Corona (15107): Lua Runtime Error: lua\_pcall failed with status: 2, error message is: bad argument #1 to 'gsub' (string expected, got nil)

Has anyone else seen this error message? Is there a fix?

UPDATE:
After looking into this a bit, the problem seems to be in admediator_admob.lua

Sometimes the format of the admob URL is:
gmsg://mobileads.google.com/open?a=browser&u=http%3A%2F%2Fhastrk1.com%2Fpub_c%3Fadgroup_id%3D5762%26ref_id%3Dad1&google.afma.Notify_dt=1340480361151

In admediator_admob.lua there is an piece of code that looks for the parameter “u”, which contains a url. It then requests this url.

local link = decodeUrlEncodedString(params.u)  
network.request(link,"GET")  

However, sometimes the format of the URL is:
gmsg://mobileads.google.com/touch?tx=156&ty=31&td=100&google.afma.Notify_dt=1340480243157

Here admediator_admob.lua cannot find parameter “u” and fails.

UPDATE2:
I think I found a solution here courtesy of @hoan:
http://developer.anscamobile.com/code/ad-mediator-corona?page=1#comment-109779

Also, if anyone knows pros and cons of having an ad only take up half the width of the screen, that would be useful to know. It just looks wrong. admediator has 320x50 hard-coded everywhere, so I haven’t tried to change the size.

[import]uid: 94304 topic_id: 21955 reply_id: 112896[/import]