facebook

Panel & adsense

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #327118 Reply

    Publio Decio
    Member

    Hello everyone, I have a simple question for many, I can not properly inserted in a panel of advertising google-adsense. Do you have any idea or example. Thanks for your attention

    Publio Decio

    #327379 Reply

    @Publio Decio

    We have not worked with google adsense for mobile. I will be glad to look into it more closely if you can provide us a small project to bootstrap the learning curve

    #327496 Reply

    californiadeveloper
    Participant

    I am also interested in using Adsense. When I go to my Adsense account, I am able to generate some Adsense HTML in the proper panel size for the MobiOne app. My question is, at what point and how would I insert the HTML code?

    #327620 Reply

    Hi californiadeveloper,

    You can use the append function of jquery to insert html code in your design. Please see a example in next thread:
    http://www.genuitec.com/support-genuitec/viewtopic.php?p=7230#p7230

    And the documentation of .append() function:
    http://api.jquery.com/append/

    #328261 Reply

    californiadeveloper
    Participant

    Thank you for letting me know about the append command. Do I add the append command into my _custom JScript file?

    Also, thank you for pointing me to the append resource. It wasn’t clear to me which of the examples there would apply to this case of appending an entire HTML file to the bottom of a screen. Can you please let me know which one I should study?

    Also, the HTML that Adsense generated for me contains many lines. Into what kind of file should I save it?

    And finally, where should I place it? In the same directory with the _custom file?

    #328278 Reply

    @californiadeveloper,

    In your case that you want to show the ads since the app starts, you should put all your lines of code in the phoneui.documentReadyHandler function. Also, I suggest you to put a transparent panel at the bottom of your design where will be appended your code:

    phoneui.documentReadyHandler = function() {

    $(‘#m1-design-bottompanel’).append(‘<div id=ads>’+
    ‘Example’+
    ‘</div>’);

    }

    #328291 Reply

    Publio Decio
    Member

    Hi octavio,

    Thanks for the ideas, I tried to embed the code but the result is incorrect. In the picture you can see the result. I used a transparent panel.

    The code:
    $(‘#ac-ldhome-bottompanel’).append(
    ‘<div id=ads>’+
    ‘<script type=”text/javascript”>’+
    ‘google_ad_client = “ca-pub-xxxxxxxxxxxxxxxxx”;’+
    ‘google_ad_slot = “45894nnnnn”;’+
    ‘google_ad_width = 320;’+
    ‘google_ad_height = 50;’+
    ‘</script>’+
    ‘<script type=”text/javascript”‘+
    ‘src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>’+
    ‘</script>’+
    ‘</div>’);

    thanks for the help

    Attachments:
    You must be logged in to view attached files.
    #328356 Reply

    californiadeveloper
    Participant

    Great. I’ll try it too. Thank you.

    #328516 Reply

    californiadeveloper
    Participant

    I need help.

    i understand that i need to
    1) create a transparent panel (I DID THIS)
    2) add code to the documentReadyHandler area of the custom script (SEE WHAT I DID BELOW)

    phoneui.documentReadyHandler = function()
    {
    $(‘#m1-YLM-bottompanel’).append(‘<div id=ads>
    ‘+’ google_ad_client = “ca-pub-xxxxxxxxxxxxx”;
    ‘+’ google_ad_slot = “nnnnnnnnnnn”;
    ‘+’ google_ad_width = 320;
    ‘+’ google_ad_height = 50;
    ‘+’src=http://pagead2.googlesyndication.com/pagead/show_ads.js;
    ‘</div>’);
    }

    No ads appear. Please advise.

    #328523 Reply

    dabbelju
    Member

    Hi californiadeveloper,

    just two quick thoughts about that one:

    1. Is the name of your panel correct (#m1-YLM-bottompanel)? I did wonder sometimes why my panels are not updating as expected. It was due to the fact, that the name of the panel was wrong. Or do you see any error message in the console?

    2. This is just a guess. I don not know if the code is right. Shouldn’t it be

    phoneui.documentReadyHandler = function()
    {
    $(‘#m1-YLM-bottompanel’).append(
    ‘<div id=ads>’+
    ‘<script type=”text/javascript”>’+
    ‘ google_ad_client = “ca-pub-xxxxxxxxxxxxx”;’+
    ‘ google_ad_slot = “nnnnnnnnnnn”;’+
    ‘ google_ad_width = 320;’+
    ‘ google_ad_height = 50;’+
    ‘</script>’+
    ‘<script type=”text/javascript”‘+
    ‘src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>’+
    ‘</script>’+
    ‘</div>’);
    }

    ?

    best
    dabbelju

    #328544 Reply

    californiadeveloper
    Participant

    Dabbelju,

    Thank you so much for your reply. Yes, the panel name is correct and no, I don’t see any error messages in the console. I do know the panel name is correct because I tried sending a test message there and it appeared.

    I also tried the modified code as you suggested, and that didn’t work. It actually caused the screen to come up completely blank in the test center whereas before adding the code, the screen comes up properly and all the other buttons and functionality work.

    I’m going to keep looking for the proper way to enable this Google code, but if you have any other suggestions, I sure do appreciate it!

    #328569 Reply

    dabbelju
    Member

    Hi californiadeveloper,

    can you post your code (best would be complete project)?

    Thanks
    Dabbelju

    #328578 Reply

    californiadeveloper
    Participant

    Thanks very much for your offer to look at my project to see if you have any suggestions for how to get the append code to work for google ads. I have uploaded it here.

    Attachments:
    You must be logged in to view attached files.
    #328589 Reply

    Hi,

    Apart from the obvious which I’m sure you know about (your id to the panel in the zipped project should be #m1-YLM-bottompanel not #ac-ldhome-bottompanel) I don’t think there is much you are doing wrong. I understand your frustration I’ve been messing with your example for some time (with our adsense code) and I just can’t get to work. The .apend only seems to work with simple text.

    Infact as good as the 2.1 update is with the new widgets I was a bit disappointed for there not to be a html one. I’m sure it’s coming but it’s a pretty important one to have. The .apend is not an ideal alternative but I would love to know of anyone who got it to work.

    I know one of the support here demonstrated the ‘+’ after each element but can anyone explain why, there is no reference to it I can find in jquery documentation.

    #328597 Reply

    californiadeveloper
    Participant

    Yes, thanks for pointing out my obvious mis-paste, but I did try the command with the correct panel name and still it’s a no-go. Thanks also for letting me know that you have been trying to get this to work to no avail…

Viewing 15 posts - 1 through 15 (of 31 total)
Reply To: Panel & adsense

You must be logged in to post in the forum log in