1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Vote Rating
    0
    chrissigler is on a distinguished road

      0  

    Default Adsense in Sencha Touch

    Adsense in Sencha Touch


    Okay, I've seen multiple threads on this subject, though none have claimed a solution. Some have tossed ideas around, some have not had any response at all, but none have actually claimed anything worked. I've tried to roll my own using a more direct approach to the problem, but no dice there either.

    Bottom line, I'm looking to bottom dock a Panel and put adsense in it. Adsense's code is basically just HTML, but it's specifically an inline <script> and a <script src='foo'>, and neither seem to play nice the old-fashioned way.

    The only other possibility I'm seeing is to iframe it, which is specifically against Google's terms of use.

    At this point, I'm bypassing Adsense altogether. I'm just trying to get an external JS file that only calls alert() to fire. I understand that Sencha Touch provides a means to call script logic so an alert() is better done elsewhere. Given the nature of what I'm really trying to do, it's going to have to be script tags to be a viable option... Ideas?

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Vote Rating
    0
    chrissigler is on a distinguished road

      0  

    Default


    Quote Originally Posted by chrissigler View Post
    The only other possibility I'm seeing is to iframe it, which is specifically against Google's terms of use.
    I've seen mention that Google allows exceptions to this policy with specific authorization from Google. So, I requested that authorization. Just heard back. Denied.

    We received your request to iframe ads on your website. We carefully reviewed your request and are unable to approve your request. Please know that placing ad code directly into the source of your page improves ad targeting. You may notice over time that your ad performance will improve leading to an increase in revenue. If you have further questions, please let us know.
    Insert surprise here.

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Posts
    4
    Vote Rating
    0
    deanmas is on a distinguished road

      0  

    Default


    Hey I found an easy way to do it - you put the two script elements given by Adsense inside a couple of divs, then you create docked component that makes the inner div (ie. the Ad container) it's own content using contentEl property.
    Outer div is there just to initially hide the ad.

    e.g.
    In index.html you put this inside the body element:

    Code:
        <div id="hidden" style="display:none">
            <div id="adsense">
                <script type="text/javascript">
                window.googleAfmcRequest = {
                client: 'XX-XX-XXXXXXXXX',
                format: '320x50_mb',
                output: 'html',
                slotname: '1232435435',
                };
                </script>
                <script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_afmc_ads.js"></script>
            </div>
        </div>
    Then in your sencha code you define you docked component

    Code:
    dockedItems : [
    {
         xtype: 'component',
         contentEl : 'adsense',
         dock : 'bottom',
         height: 50
     }   
    ]

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    3
    Vote Rating
    0
    joyontaroy is on a distinguished road

      0  

    Default


    Just perfect solution, great!

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Location
    Armenia
    Posts
    2
    Vote Rating
    0
    anipapyan is on a distinguished road

      0  

    Default More than 4 ads...

    More than 4 ads...


    I also solved this problem by using contentEl, but it works only for few ads. How can I have more than 4 ads in Sencha touch app?

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar