*

slaven

  • ***
  • 81 posts
Problem Google Adsense
« on: June 23, 2021, 10:23:05 AM »
Advertisement Delta Osclass Theme / Enable Theme Banners /

Adsense code works on all other sites and other Osclass themes ... it doesn't work on the Delta theme properly. The problem is somewhere in the theme.

Osclass is the latest 4.4 and delta theme ...

Note: Adsense code that is customizable (AUTO) does not work while fixed ads / banners work.

The only difference in the code is that automatic ads contain a line of code


"data-ad-format =" auto "> </ins>"

The delta theme is great but this bug should be resolved quickly

Adsense code comparison

Fixed banner (work)

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Soliter 160x600 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:160px;height:600px"
     data-ad-client="ca-pub-xxxxxxxxxx"
     data-ad-slot="636xxxx403"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>

Auto banner (not work)

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Soliter 160x600 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxx"
     data-ad-slot="636xxxx403"
     data-ad-format="auto"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



« Last Edit: June 23, 2021, 10:30:09 AM by alexborg »
Osclass

*

MB Themes

Re: Problem Google Adsense
« Reply #1 on: June 23, 2021, 10:55:24 AM »
@alexborg
Theme has fixed size for banners. Do not see issue at all.
Code: [Select]
.banner-search_top .myad, .banner-search_middle .myad, .banner-search_bottom .myad, .banner-item_description .myad {width:728px;height:90px;}
.banner-home_top .myad, .banner-home_bottom .myad, .banner-item_top .myad, .banner-item_bottom .myad, .banner-home_middle .myad {width:970px;height:90px;}
.banner-item_sidebar .myad {width:300px;height:250px;}
.banner-item_sidebar_bottom .myad {width:300px;height:600px;}
.banner-body_left .myad, .banner-body_right .myad {width:160px;height:600px;background:#fff;}
.banner-search_sidebar .myad {width:200px;height:200px;}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slaven

  • ***
  • 81 posts
Re: Problem Google Adsense
« Reply #2 on: June 23, 2021, 02:10:13 PM »
Fixed ads are showing, but automatic (custom) ads aren't showing on the site ... that's a problem.

The fixed size is set nicely in CSS, however, automatic ads adjust themselves and there is a problem somewhere ... please note, this only happens on the Delta theme, while the same code for ads on other topics works without problems.
Osclass

*

MB Themes

Re: Problem Google Adsense
« Reply #3 on: June 23, 2021, 02:15:12 PM »
@alexborg
There is only 1 function theme should cover - show code you have defined in backoffice. Nothing more, nothing less.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slaven

  • ***
  • 81 posts
Re: Problem Google Adsense
« Reply #4 on: June 23, 2021, 02:38:56 PM »
Ok. Then why does everything work properly, for example on the Tatiana theme ... the same code as everything?

There can be no problem with Google Adsense code ... it's javascript that should be adapted to the theme.
Osclass

*

MB Themes

Re: Problem Google Adsense
« Reply #5 on: June 23, 2021, 02:41:43 PM »
@alexborg
Please send URL where is the problem.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots