Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admob confirmation arrow are not being displayed #19

Closed
reneretz opened this issue Jun 4, 2012 · 14 comments
Closed

Admob confirmation arrow are not being displayed #19

reneretz opened this issue Jun 4, 2012 · 14 comments

Comments

@reneretz
Copy link
Contributor

reneretz commented Jun 4, 2012

Admob confirmation arrow are not being displayed

@reneretz
Copy link
Contributor Author

reneretz commented Jun 7, 2012

It is happening in some Ad Affiliate. I think from InnerActive

@reneretz
Copy link
Contributor Author

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>

@reneretz
Copy link
Contributor Author

Hi @deniza could you point me the right direction? I need to fix it to submit a new App this week. Thanks.

@deniza
Copy link
Owner

deniza commented Jun 25, 2012

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:

#19 (comment)

@reneretz
Copy link
Contributor Author

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 :)

@reneretz
Copy link
Contributor Author

@deniza Are you back from vacation? Can you help me with this?

@deniza
Copy link
Owner

deniza commented Jul 12, 2012

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:

#19 (comment)

@deniza
Copy link
Owner

deniza commented Jul 18, 2012

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..

@reneretz
Copy link
Contributor Author

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...

@deniza
Copy link
Owner

deniza commented Jul 18, 2012

what happens when you click on banner? does corona consol display a message like "unknown protocol scheme"?

@reneretz
Copy link
Contributor Author

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&...

@deniza
Copy link
Owner

deniza commented Jul 18, 2012

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?

@reneretz
Copy link
Contributor Author

Ok, I will try to write e patch and test it...

@reneretz
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants