Closed reneretz closed 12 years ago
It is happening in some Ad Affiliate. I think from InnerActive
Actually it is from AdMob. There is some local (not absolute) reference in the HTML (redirect link is not valid) and also in downloaded JS (arrow image link is not valid)
Here is a created HTML with the problem.
@deniza can you help me with this? Save the following HTML and you will see the problem (arrow and link). Is it possible to intercept the request and change the URL adding the absolute path?
<html><head>
<meta name="viewport" content="width=320; user-scalable=0;"/><meta charset='utf-8'><script>function a(b){this.t={};this.tick=function(b,f,d){this.t[b]=[void 0!=d?d:(new Date).getTime(),f]};this.tick("start",null,b)}var c=new a;window.jstiming={Timer:a,load:c};try{var e=null;null==e&&window.gtbExternal&&(e=window.gtbExternal.pageT());null==e&&window.external&&(e=window.external.pageT);e&&(window.jstiming.pt=e)}catch(g){}var h=window.onerror;window.onerror=function(){window.jstiming.jsError=1;"function"==typeof h&&h.apply(window,arguments)};</script><meta name="viewport_disabled" content="width=device-width,height=device-height,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0"><script src="http://media.admob.com/formats/templates.js"></script><script>document.addEventListener("touchmove", function(e) {e.preventDefault();});</script><style>* {background:transparent;font-family:sans-serif;margin:0px;padding:0px;-webkit-user-select:none;}a {text-decoration:none;}</style></head><body onload="onLoad()"><div id="google_ad"></div><script>renderAd(document.getElementById('google_ad'), {"creatives":[{"destination_url":"removed","text_creative":{"ad_text":["Aplicativo Bradesco","Acesse sua conta da comodidade","do seu Smartphone. Baixe Já!"],"line_rtl":[false,false,false],"visible_url":"Itunes.Apple.com/APPBradesco","button_text":"Visit Site"}}],"creative_type":1,"height":50,"width":320,"attribution":{"destination_url":"http://www.google.com/ads/preferences/html/mobile-about.html","icon_url":"http://googleads.g.doubleclick.net/pagead/images/adc-i-00aecd.png","text":"AdChoices","position":0},"background_color_top":"#323232","background_color_bottom":"#000000","text_color":"#ffffff"});</script>
</body></html>
Hi @deniza could you point me the right direction? I need to fix it to submit a new App this week. Thanks.
Hi rene, I am on a vacation for a while, so I really do not have an easy access to my development environment. Do you also have this issue on ios, or it is android only? I just checked several of my ios apps and admob seems to be working as expected.
deniz.
On Mon, Jun 25, 2012 at 5:52 PM, René Retz < reply@reply.github.com
wrote:
Hi @deniza could you point me the right direction? I need to fix it to submit a new App this week. Thanks.
Reply to this email directly or view it on GitHub:
https://github.com/deniza/Ad-Mediator-for-Corona/issues/19#issuecomment-6549392
Hi @deniza ! Sorry to bother you on vacation! I have this issue on iOS and do not have tested on Android.
The problem happens only with some ads. Maybe you were not receiving this Ads at your country.
I will try to get more informations. Let me know when you are back!
Enjoy your vacation :)
@deniza Are you back from vacation? Can you help me with this?
yep, i am back again. i am going to look at it in a while.
On Wed, Jul 11, 2012 at 8:34 PM, René Retz < reply@reply.github.com
wrote:
@deniza Are you back from vacation? Can you help me with this?
Reply to this email directly or view it on GitHub:
https://github.com/deniza/Ad-Mediator-for-Corona/issues/19#issuecomment-6913703
rene, do you still get "broken" icon & arrow images? It is possible to intercept clicked url and change the target, but I am not sure what is the proper target uri prefix..
I think that the proper prefix is the same from the last request. So, it would be:
local adServerUrl = "http://googleads.g.doubleclick.net"
I have changed the destiny url in my HTML example (after click) and it seems to redirect to the correct destiny. I do not know where to intercept it in your code...
what happens when you click on banner? does corona consol display a message like "unknown protocol scheme"?
No, it is entering in your first if
if string.find(event.url, "file://",1,true) then
with the event.url:
file:///aclk?sa=L&...
ok then you could test this case with an extra if, ie:
if string.find(event.url, "file:////aclk?",1,true) then ...
and inside that if, parse url:
local parsedUrl = urlmodule.parse(event.url)
finally you can rebuild a proper url with googleads.g.doubleclick.net prefix and call system.openUrl with this new uri. please check urlmodule documentation for further usage samples.
This may work, but it is also very messy. Could you please try it?
Ok, I will try to write e patch and test it...
This solution saves the click but it would not load the correct arrow (image) on the Ad, since it has another baseUrl. I have tried two more things, load the "webview.html" file with a remote baseUrl and even redirect the event.url on the listener, but was not successful on both approach.
I give up on this
Admob confirmation arrow are not being displayed