Site logo

[Support request] Google Ads Are not showing on my blog page

Home Forums Support [Support request] Google Ads Are not showing on my blog page

Home Forums Support Google Ads Are not showing on my blog page

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1834483
    Onur

    Hi,

    I do not know what happened on my blog today I saw that on the about and contact pages of my blog the google Adsense codes are not working. Also, the WP contact form was not working. Temporarily, I have removed the contact page. I am using the WPForms Lite plugin. This is an another problem, that I will address later.

    Now, my question is, on about page: https://www.swtestacademy.com/about/

    google adsense codes are not working.

    I tried to remove WP_Rocket plugin, disables all optimizations, removed custom css codes, etc. tried everything but I could not solve this problem. Before it is working without any problem. I also did not get it why this problem occurred.

    When I open the console I saw the below errors.

    Uncaught
    Object { message: “adsbygoogle.push() error: No slot size for availableWidth=0”, stack: “N@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:72:574\nYk@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:158:453\nXk@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:157:139\njl@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:164:238\nCm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:213:503\nTm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:217:108\nSm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:216:637\nan@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:230:332\nXm/<@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:225:49\nn.ka@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:67:804\nUe@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:75:106\nXm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:225:31\nWm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:222:71\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:241:212\nn.ka@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:67:804\nUe@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:75:106\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:239:442\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:241:315\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:243:4\n”, name: “TagError”, pbr: true }
    adsbygoogle.js:222:118

    Uncaught
    Object { message: “adsbygoogle.push() error: No slot size for availableWidth=0”, stack: “N@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:72:574\nYk@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:158:453\nXk@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:157:139\njl@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:164:238\nCm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:213:503\nTm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:217:108\nSm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:216:637\nan@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:230:332\nXm/<@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:225:49\nn.ka@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:67:804\nUe@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:75:106\nXm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:225:31\nWm@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:222:71\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:241:212\nn.ka@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:67:804\nUe@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:75:106\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:239:442\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:241:315\n@https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:243:4\n”, name: “TagError”, pbr: true }

    And when I check the generated HTML source code, I did not see the script tags.

    adsense is not loading generate press

    Would you please help me to solve this problem please?

    #1834510
    David
    Staff
    Customer Support

    Hi there,

    looks like the advert cannot calculate the size of its container. Which is probably due to the Content Container being set to Full Width on that page:

    https://docs.generatepress.com/article/content-container/

    Set it to default – and the advert should then be able to calculate the correct size.

    #1834524
    Onur

    Hi David,

    Both 3 versions did not work.

    Full-width
    https://www.swtestacademy.com/about/

    Default

    Contained

    #1834526
    David
    Staff
    Customer Support

    Can you set it and leave it as Default. Then clear any plugin / browser caches. And then let me know so i can take another look.

    #1835249
    Onur

    Hi David,

    I have set it as default and clear the caches. Looking forward to hearing from you.

    #1835250
    Onur
    #1835549
    David
    Staff
    Customer Support

    What are you using to display different widgets in the sidebars? On the other pages there are other widgets being displayed but none on the About page. Can you add some other widgets to that page

    #1835956
    Onur

    Hi David,

    I am using this sidebar plugin for custom sidebars: https://wordpress.org/plugins/sidebar-manager/

    I am using custom sidebars but the problem not only sidebars. On this page, I am using custom HTML to add the google ads and they are not working as well.

    Before, I did not have any problem. I am also investigating what caused this problem. It may be somehow JS-related problem but still, I am not sure and I don’t have any clue.

    On posts, blog page, and category pages I don’t have problems.

    #1836034
    David
    Staff
    Customer Support

    The advert scripts have data-ad-format="auto" attribute – which means it will fit whatever container it sits inside. And that error generally means it cannot calculate the width of that container. I had a google for the issue and there were other users will similar problems but no clear answer to what fixed it.

    Might be worth change your custom sidebars for that page to one that is working on another page to see if that resolves the issue.

    #1836158
    Onur

    Hi David,

    The main problem as I saw was something was removing the <script> tags of the ad code. I did a search on it and I found a plugin shortcoder and rather than using the custom HTML of WordPress, I used the shortcode and this solved the problem.

    I think it may be about unfiltered_html attribute but I am not sure. I did not change anything.

    Ref: https://confluence.emirates.com/pages/viewpage.action?spaceKey=OX&title=Support+Roster+for+Oxygen+Platform

    #1836317
    David
    Staff
    Customer Support

    It’s odd as it doesn’t explain why other pages work correctly and that one doesn’t.

    Glad you found a solution to the problem.

    #1836320
    Onur

    Yes David, I really did not get why it happened but somehow this trick solved the problem.

    Thanks for your support and your time.

    Kind Regards,
    Onur

    #1836614
    David
    Staff
    Customer Support

    You’re welcome

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.