Okay
  Public Ticket #421375
Google Adsense
Closed

Comments

  •  1
    Matthias started the conversation

    Hey there all together

    I really don't fully understand the documentation when it comes to the use of adsense. Is it possible now to inject adsense into the loop or is it not. Also, how would you get the adsense ad in the sidebar, since there isn't any option in the ad-settings? Thank you!

  • Sean replied

    I have been able to do this two ways: One, if you click on the $ on the Theme Options you can paste your AdSense code into each slot where you would like it to appear by default (review demo for more details on locations).

    Second option for the side bar, is you need to create widgets to house your AdSense code. For example, if you go to create custom side bar on theme manager, make one called:Google AdSense. Then when you are in your widgets screen, drag a text box into this widget and paste your Adsense code into the text body (no title). Now you can assign this to any sidebar for your ads.

    Make sense?

  •  1
    Matthias replied

    Yeah, sure. You don\'t even have to make a custom sidebar, you can just use the standard text/html widget included in wrodpress and drag that into your sidebar. Anyway, what isn\'t clear to me is injecting adsense into a loop is working and what that ajax functionality does.

  • Sean replied

    Have you scrolled down to the very bottom of the Advertising theme option and added your code to the loop, co figured how much it shows and how often?

  •  263
    Brian replied

    Adsense doesn\'t let you load ads in ajax-loaded content, so that option to turn off ajax ads pertains to adsense ads, so you should leave that turned off. So ads will just display on the first page of loaded post loop content.

  •  1
    Matthias replied

    I think there is a bug with the adsense insertion into the loop regarding responsive design. Or do I need to apply a certain setting for it to work?

    Check my site https://vrodo.de/ and have a look at the add in the loop. It shows fine on desktop but if you check it on the smartphone (or a smaller browser window) the ad switches with every scroll movement...seems off to me. An idea on how to fix that?

  •  1
    Matthias replied

    This is the response I got from Google - could you please fix the reloading issue? If you won\'t fix it, it can get people banned from adsense for a lifetime.

    I didn\'t know about the stickybar thing:

    I see an AdSense policy violation on your site. You have a sticky header. When the page is scrolled, the ad is obscured by the header. No element of a page can obscure an AdSense ad. In addition, since the header has clickable elements, if someone where to click the header while the ad was partially obscured, the ad might react instead of the header, or the ad might be clicked by accident. That would be invalid activity. Get enough of that and your website and/or AdSense account can be disabled.

    As for the issue with your ad refreshing constantly, it\'s probably due to the nature of your site. It probably has something to do with the div the ad is in changing size. The ad extends beyond the edge of the page and appears to be hidden. That\'s another AdSense policy violation.

    Refreshing the ad is not allowed without reloading the page. That\'s another AdSense policy issue.

    I suggest removing the ads from that page until you get this worked out. Right now, you\'re subject to receiving warnings for those policy issues.

    EDIT:

    I also got a reply regarding what\'s causing this issue:

    When I deactivate <div class=\"col-md-7 loop-column\"> in chrome developer tool, the ad stops refreshing when scrolling the page in smaller layout. So check your loop or scripts that may cause this.

    EDIT 2:
    What is also getting your adsense account banned potentially: Using the top 10 widget on mobile, because that is broken and overlapping the ad if above.

    Using the utility menu above an ad, because that flaps out and is then above the ad.

    Could you please try to fix it? Thanks. I took my ads out now so that I won\'t get banned from adsense for lifetime...

    Also guys, please make sure to NOT put ads in the sidebars. The sidebars are all sticky. You will get banned for that!

  •  263
    Brian replied

    I think the issue is the sticky sidebars like you said. Adsense can\'t be in a sticky sidebar, so you need a way to turn those off. We have it on our list to add a new option to disable sticky sidebars in a future theme update. For now you would need something like this added to your custom css theme option (untested):

    .fixed-object {position:relative!important}

    Also you can already \"unstick\" the sticky bar which would take care of the first issue (it\'s in the theme options).

  •  1
    Matthias replied

    HI Brian,

    so you are saying that the adsense in loop reload issue is because of the stickybars? And you plan to fix that in a future update? Did I get it right? Because that is something that violates the adsense rules. The ad in the loop itself is fine since the loop isn\'t sticky, but the reloading on scroll isn\'t fine. :) It\'s only happening on mobile/responsive layout. I\'m not sure if you got that issue right. :)

    I\'m talking about this here:

    \"When I deactivate <div class=\"col-md-7 loop-column\"> in chrome developer tool, the ad stops refreshing when scrolling the page in smaller layout. So check your loop or scripts that may cause this.\"

    That\'s the feedback from google regarding the reloading issue. Can you please confirm that you got what I\'m talking about? :) Google will detect an unnatural high amount of refreshing ads and will ban you for that, if you insert adsense into the loop right now.

    All the other issues aren\'t theme problems per se, it\'s just something you need to be aware off. The Top 10 widget is broken on mobile though. Top 5 is fine, but Top 10 is leaking content under the ads (if you got an ad placed unter top 10 of course).

    Also an option to disable ads on an indvidual page is a must have since it\'s so easy to violate adsense rules. For example, I had an article about the porn industry using virtual reality devices. It\'s journalistic and no explicit content at all but Google doesn\'t give a f**** and will ban you if there is an ad there. I used this plugin as a workaround: https://github.com/galeksic/adsenseonthispage It also disabled the ads in the searc results thankfully. Maybe you can incorporate that code or something similiar in future themes and updates. Keep in mind, if google bans you once, you are gone for lifetime, no second chance - and it has by far the best revenues. So better be safe than sorry! Would love it you take care of that.

  •  263
    Brian replied

    In that case (since it\'s only happening on mobile) it could be because of how it moves the loop below the main content area. Matter of fact that\'s probably what it is. You\'d have to get rid of the moveloop functionality, but that could affect your site\'s responsiveness.

  •  1
    Matthias replied

    Well, isn\'t that something you should know/answer/fix?

    And I think it would be also fair to warn your customers. Most will stick to adsense and your theme will get them banned.

  • Purple replied

    As I have written to you on my older post, this is an issue that must be fixed immidiatelly using the default pagitation of wordpress so it would refresh the page in post loops and the adsense to be updated without any problem.

    Also, there should be the option to put widgets on post loops intead of putting only ads.

    Another problem with the ads on the rules of google is the issue on the footer of the theme.

    In short, the theme has issues with ads and these should have been fixed all this time.
    Even the demo on the site works with the version 1.3.

  •  263
    Brian replied

    Those are actually two separate issues.

    @Matthais: yes I know how to fix that. You have to get rid of the calls to the moveLoop(); function in the js/scripts.js file lines 194 and 293. Then of course you\'d need to copy everything from scripts.js to scripts.min.js since that\'s the file that\'s actually used by the theme.

  •  1
    Matthias replied

    Thanks. Any chance you will fix that in the next theme update since I\'m not to eager to do that kind of work?

  •  263
    Brian replied

    It\'s possible that I\'ll add an option to toggle that, not sure yet...

  • Mahadzir replied

    Hi Brian, can i still use this code to disable floating sidebar as it violate adsense ads?

    .fixed-object {position:relative!important}

    I tried but the ads still floating even after i tried to unstick the header stickybar

    Thank you please help

  •  263
    Brian replied

    What's your URL so I can take a look to see what the code would need to be?

  • Mahadzir replied

    Hi Brian, thanks a lot for the reply

    This is my url with post and with sidebanner page widget: http://malaysianreview.com/173808/pesanan-peguam-tun-mahathir-kepada-khairy-mengenai-mentaliti-rakyat/

    I think it would better if the home, front page, archive and directory also can be disable the floating widget. 

    So that I can place adsense 300x600 ads on sidebar at all those places. 

    Thank You Again

  •  263
    Brian replied

    Try this instead:

    .fixed-object.fixed {position:relative!important}

  • Mahadzir replied

    Hi Brian, 

    I have put the code you gave.

    Can you please check whether the adsense code on the top right is still consider floating by google?

    I am curious coz the ads seems to move upwards but then it drops again below. 

    Here is the url: http://www.malaysiastylonews.com/165708/penjenayah-sembur-diesel-ke-arah-kenderaan-polis/

    Thank you so much for the help Brian

  •  263
    Brian replied

    Looks like you're close, but you need to additionally add this:

    .fixed-object.taller-fixed {position:relative!important}