Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
jackflash Posted July 23, 2018 Posted July 23, 2018 When I ad the Popular Contributors, Top and Post feeds blocks to the sidebar, ads are appearing within the blocks? Why and how do I get rid of them?
bfarber Posted July 23, 2018 Posted July 23, 2018 We'd need to see a link to where this is happening - obviously we don't ship ads out of the box.
jackflash Posted July 23, 2018 Author Posted July 23, 2018 1 hour ago, bfarber said: We'd need to see a link to where this is happening - obviously we don't ship ads out of the box. I just put the blocks back in the sidebar: https://www.LincolnMKZForum.com
steve00 Posted July 23, 2018 Posted July 23, 2018 49 minutes ago, jackflash said: I just put the blocks back in the sidebar: https://www.LincolnMKZForum.com looks like have a few references to google ads in your forum Remove those and should be ok
jackflash Posted July 23, 2018 Author Posted July 23, 2018 1 hour ago, steve00 said: looks like have a few references to google ads in your forum Remove those and should be ok I was thinking the same thing, however, I don't know where they are at. They are in the default theme too, which I didn't edit......
Surendra.S Posted July 23, 2018 Posted July 23, 2018 56 minutes ago, jackflash said: I was thinking the same thing, however, I don't know where they are at. They are in the default theme too, which I didn't edit...... You have enabled GOOGLE AUTO ADS. I can see below code in your page source. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "xxxxxxxxxxxxxxxxxxx", enable_page_level_ads: true }); </script> You can check where you have enabled this code. My best guess is that you may have enabled it in IPB ADMIN > System > SITE PROMOTION > Advertisements I think you created some Advertisement to put these GOOGLE AUTO ADS in SIDEBAR. Check for that Advertisement and disable it. Also, please note that you need to put the GOOGLE AUTO ADS CODE between <header> & </header> HTML tags. But you have put the code probably in wrong place. I can see the code outside </header> tag. Hope this helps !
jackflash Posted July 23, 2018 Author Posted July 23, 2018 14 minutes ago, Surendra.S said: You have enabled GOOGLE AUTO ADS. I can see below code in your page source. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "xxxxxxxxxxxxxxxxxxx", enable_page_level_ads: true }); </script> You can check where you have enabled this code. My best guess is that you may have enabled it in IPB ADMIN > System > SITE PROMOTION > Advertisements I think you created some Advertisement to put these GOOGLE AUTO ADS in SIDEBAR. Check for that Advertisement and disable it. Also, please note that you need to put the GOOGLE AUTO ADS CODE between <header> & </header> HTML tags. But you have put the code probably in wrong place. I can see the code outside </header> tag. Hope this helps ! THANKS for taking the time to help. Someone did this before me, so now I have to figure out where they placed these ?
Surendra.S Posted July 23, 2018 Posted July 23, 2018 6 minutes ago, jackflash said: THANKS for taking the time to help. Someone did this before me, so now I have to figure out where they placed these ? try : IPB ADMIN > System > SITE PROMOTION > Advertisements Open each Advertisement and see in which one the above Google code is mentioned.
DesignzShop Posted July 23, 2018 Posted July 23, 2018 If you have pages you can also check the custom blocks section in your acp Kind Regards
jackflash Posted July 23, 2018 Author Posted July 23, 2018 2 minutes ago, Surendra.S said: try : IPB ADMIN > System > SITE PROMOTION > Advertisements Open each Advertisement and see in which one the above Google code is mentioned. I turned off the ads for mobile devices and that stopped them. I really didn't think that this was the issue because I used this snipet, which I thought would only make it work on mobile devices? <div class='ipsResponsive_showPhone ipsResponsive_block'> <center> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-", enable_page_level_ads: true }); </script> </center> </div>
Surendra.S Posted July 23, 2018 Posted July 23, 2018 try below if you want to show ADs only in Mobile. <div class='ipsResponsive_showPhone ipsResponsive_hideTablet ipsResponsive_hideDesktop'> <!-- Place your AD code here --> </div>
jackflash Posted July 23, 2018 Author Posted July 23, 2018 2 minutes ago, Surendra.S said: try below if you want to show ADs only in Mobile. <div class='ipsResponsive_showPhone ipsResponsive_hideTablet ipsResponsive_hideDesktop'> <!-- Place your AD code here --> </div> THANKS, again! I checked a different site and it uses: <div class="ipsResponsive_showPhone ipsResponsive_block"> <!-- Mobile Advertisement --> <div> The site that I had problems with was done incorrectly by my colleague.
Dll Posted July 23, 2018 Posted July 23, 2018 You're going to run into problems hiding ads with css as they'll still load without displaying and you'll be breaking Google's TOS.
jackflash Posted July 23, 2018 Author Posted July 23, 2018 5 minutes ago, Dll said: You're going to run into problems hiding ads with css as they'll still load without displaying and you'll be breaking Google's TOS. what's the best way to use their ads on mobile vs. computer?
Surendra.S Posted July 23, 2018 Posted July 23, 2018 30 minutes ago, Dll said: You're going to run into problems hiding ads with css as they'll still load without displaying and you'll be breaking Google's TOS. You mean using this kind of <div> for ADs in Desktop vs Mobile will be problem ? <div class='ipsResponsive_showPhone ipsResponsive_hideTablet ipsResponsive_hideDesktop'> If so, whats the best way to deal with displaying separate ADs for Desktop and Mobile ? Can you please suggest.
Dll Posted July 23, 2018 Posted July 23, 2018 59 minutes ago, Surendra.S said: You mean using this kind of <div> for ADs in Desktop vs Mobile will be problem ? <div class='ipsResponsive_showPhone ipsResponsive_hideTablet ipsResponsive_hideDesktop'> If so, whats the best way to deal with displaying separate ADs for Desktop and Mobile ? Can you please suggest. Yes, that sort of div will hide the ads but not stop them from actually loading. You can see this happening, load the page on a desktop, then shrink the browser window to mobile size and you'll see the ads will be there without any need to reload the page. You'll need to use some width detection on the javascript as well, something like will only display on mobile (you can change the width to whatever the breakpoint is on your theme): <script> var width = window.innerWidth || document.documentElement.clientWidth; if (width<768) { .. ad loading js in here .. } </script>
jackflash Posted July 23, 2018 Author Posted July 23, 2018 2 hours ago, Dll said: Yes, that sort of div will hide the ads but not stop them from actually loading. You can see this happening, load the page on a desktop, then shrink the browser window to mobile size and you'll see the ads will be there without any need to reload the page. You'll need to use some width detection on the javascript as well, something like will only display on mobile (you can change the width to whatever the breakpoint is on your theme): <script> var width = window.innerWidth || document.documentElement.clientWidth; if (width<768) { .. ad loading js in here .. } </script> If what you are saying is correct, this is a very serious problem when using this software for ad revenue. It's potentially devastating if it violates Google / Bing TOS. What's the clean solution here? Isn't there a way to just past the ad code in the template somewhere? That's what I did on 3.4.6 for the desktop version at least. @Lindy
Dll Posted July 24, 2018 Posted July 24, 2018 There are lots of solutions, but it's not a problem with the software at all. It's a responsive design, like most of the web these days and this is how it works. If you don't want to do as suggested above, how about using responsive ad units, or use an adserver like dfp which will do the heavy lifting for you.
jackflash Posted July 25, 2018 Author Posted July 25, 2018 On 7/24/2018 at 2:37 AM, Dll said: There are lots of solutions, but it's not a problem with the software at all. It's a responsive design, like most of the web these days and this is how it works. If you don't want to do as suggested above, how about using responsive ad units, or use an adserver like dfp which will do the heavy lifting for you. I will look into this further. Let me rephrase, I wish IPS offered a way to use the ad manager in two different formats: one for desktop ONLY and one for mobile.
Day_ Posted July 25, 2018 Posted July 25, 2018 On 7/23/2018 at 8:16 PM, Dll said: You're going to run into problems hiding ads with css as they'll still load without displaying and you'll be breaking Google's TOS. They updated this a while ago, even show people how to hide ads using CSS on their site https://support.google.com/adsense/answer/6307124?hl=en-GB
jackflash Posted July 25, 2018 Author Posted July 25, 2018 3 hours ago, dayh said: They updated this a while ago, even show people how to hide ads using CSS on their site https://support.google.com/adsense/answer/6307124?hl=en-GB THANK YOU so very much for taking the time to post this. It's makes everything really easy going forward!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.