Adsense Native ad injection troubles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Letzride
    Member
    • Jun 2017
    • 81
    • 5.5.x

    Adsense Native ad injection troubles

    Hi there,

    I am trying to implement Google Adsense into my conversation content like I see on so many forums - I would like my ad to be randomly injected into one of the posts for non registered members.

    To go about do this, I got my google adsense code, clicked "edit page" in my conversation template and hovered over the little pencil as shown in the image below. I then entered my Google Adsense code into the module for "add first post content ad" made sure it was active and clicked save.

    However - I am unable to get my forum to produce an advertisement in any of the posts - not the first post or any others. I tried making the setting so that everyone could see the post including registered members and I still cannot solve the issue...what have I done wrong here? This is the test page in case someone needs it: https://www.camarov6.com/forum/camar...-exhaust-clips

    Further to the below image, I read through this thread here and specificially post #7: https://www.vbulletin.com/forum/foru...st-ad-location

    I followed the directions to edit the style manager but got a message telling me "I do not have administrative privileges" so I can't go that route either.

    Surely there must be a way to inject a google adsense ad between posts?


    Click image for larger version  Name:	Ad injection.PNG Views:	1 Size:	65.7 KB ID:	4386723
    V6 Camaro Forum | Deep Scratch Repair | How To Guides | Project Cars


    Vote for:

    Ability to display ads for xx number of views / impressions: http://tracker.vbulletin.com/browse/VBV-18045
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4005
    • 5.7.X

    #2
    Google Adsense is complaining that "adsbygoogle.push() error: No slot size for availableWidth=0" in the Javascript console. This means that the ad container has zero width. For Responsive Google Adsense units, the container requires to have explicit width to be able to insert the ad with the correct size.

    Try adding this custom CSS in css_additional template in AdminCP or via Sitebuilder > Style > CSS Editor:

    Code:
    .axd_first-post, .axd_last-post {
        float: none;
    }
    Removing the float causes the container's width to automatically extend to 100% of its parent.

    Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

    Comment

    • Letzride
      Member
      • Jun 2017
      • 81
      • 5.5.x

      #3
      Originally posted by Glenn Vergara
      Google Adsense is complaining that "adsbygoogle.push() error: No slot size for availableWidth=0" in the Javascript console. This means that the ad container has zero width. For Responsive Google Adsense units, the container requires to have explicit width to be able to insert the ad with the correct size.

      Try adding this custom CSS in css_additional template in AdminCP or via Sitebuilder > Style > CSS Editor:

      Code:
      .axd_first-post, .axd_last-post {
      float: none;
      }
      Removing the float causes the container's width to automatically extend to 100% of its parent.
      Fantastic! This worked to correct my issue thank you very much.

      For my own learning purposes how / what program did you use to determine that google adsense was "complaining?"
      V6 Camaro Forum | Deep Scratch Repair | How To Guides | Project Cars


      Vote for:

      Ability to display ads for xx number of views / impressions: http://tracker.vbulletin.com/browse/VBV-18045

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4005
        • 5.7.X

        #4
        I used the browser dev tools by pressing F12 or right clicking anywhere on the page and choosing Inspect element. Then opening the Console tab to look for Javascript errors. That's where I found the GA error.

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        Related Topics

        Collapse

        Working...