1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get adsense ads to appear on the mobile version of my website

Discussion in 'Mobile Marketing' started by fabcb, May 20, 2013.

  1. fabcb

    fabcb Newbie

    Joined:
    Feb 18, 2013
    Messages:
    8
    Likes Received:
    0
    Hey guys I am currently employing CTR theme on my website and have noticed that a lot of my traffic is actually mobile. Now I have looked at all sorts of mobile plugins but none of them seem to be capable of posting ads!!! There is service called Mobicow that does full site ads when you open the mobile site but I am not sure this is safe with adsense. :confused:

    So guys any solutions? Thanks for any input
     
  2. Lyscer

    Lyscer Junior Member

    Joined:
    Jun 29, 2012
    Messages:
    109
    Likes Received:
    46
    Occupation:
    Software Engineer
    Judging by the title of the thread you are looking for a way to show adsense on your mobile devices? I have javascript determine the screen size of the device and then display the ads accordingly. I found a thread somewhere where google advises against manipulating anything dealing with their adsense, but my site has been reviewed by google (I know because they emailed me and told me they reviewed it and that I could schedule a call with their specialists to optimize my page further) and they didn't shut me down for this so I know it is okay with them, or at least the okay with the person that reviewed my site. I do this on my sites by creating 2 different ad units (and it helps with tracking). You can see the size of the ad units are laid out in the code, as I just use the banners for now.
    Code:
    <script type="text/javascript"><!--
                var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0],x=w.innerWidth||e.clientWidth||g.clientWidth,y=w.innerHeight||e.clientHeight||g.clientHeight;
    
    
                google_ad_client = "ADSENSE_AD_CLIENT_ID";
                
                if(x >= 728){
                    google_ad_slot = "ADSLOT_ID_FOUND_IN_ADSENSE";
                    google_ad_width = 728;
                    google_ad_height = 90;
                } else {
                    google_ad_slot = "ADSLOT_ID_FOUND_IN_ADSENSE";
                    google_ad_width = 320;
                    google_ad_height = 50;
                }
    
    
                //-->
            </script>
            <script type="text/javascript"
                src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script>
    
     
    • Thanks Thanks x 2
  3. fabcb

    fabcb Newbie

    Joined:
    Feb 18, 2013
    Messages:
    8
    Likes Received:
    0
    thank you so much. Absolute legend.
     
  4. illegaloutrage

    illegaloutrage Newbie

    Joined:
    Feb 17, 2013
    Messages:
    2
    Likes Received:
    1
    when your site is approved by google it says nothing about that you will be banned later!
    also buying traffic and send this to a adsense site can happen in a ban from google when they are not satisfied with it. google wants organic traffic to their ads. everything else can make you unhappy. trust me i know it cause i was banned of this reason...