[VB5.1.3] adsense asynchronous x synchronous

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • -=|zami|=-
    Senior Member
    • Feb 2009
    • 190

    [VB5.1.3] adsense asynchronous x synchronous

    friends, I have the following problem: when I use asynchronous google adsense script, the page below of the code does not load. but, when I use synchronous script, the page loads normally, but compromises the loading speed.

    1) header with asynchronous

    Click image for larger version

Name:	header.png
Views:	83
Size:	24.1 KB
ID:	4150354

    2) header with synchronous

    Click image for larger version

Name:	header-sync.png
Views:	81
Size:	498.8 KB
ID:	4150355

    3) footer with assynchronous

    Click image for larger version

Name:	footer.png
Views:	77
Size:	23.0 KB
ID:	4150356

    4) footer with synchronous

    Click image for larger version

Name:	footer-sinc.png
Views:	77
Size:	69.3 KB
ID:	4150357


    would be some incompatibility of the VB5 with the adsense asynchronous script?

    someone has gone through this problem? any tips?

    Thank you!
    Attached Files
    Last edited by -=|zami|=-; Fri 19 Sep '14, 1:26am.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    What is the javascript error that is preventing the rest of the page from loading? You should be able to see this in your browser's developer tools or console.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

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

      #3
      Is your site live? Can you post a link?

      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

      • -=|zami|=-
        Senior Member
        • Feb 2009
        • 190

        #4
        Friends, thanks for listening!

        I do not understand well the debugger, but follows the images obtained.
        apparently the error is always the same in both the header and in the footer: "Uncaught SyntaxError unexpected token <"

        Thank you!

        header:

        Click image for larger version

Name:	header1.png
Views:	90
Size:	91.6 KB
ID:	4150775
        Attached Files
        Last edited by -=|zami|=-; Fri 19 Sep '14, 1:27am.

        Comment

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

          #5
          How are you adding the ad code? Via Ad Module or HTML Module?

          From your first screenshot, I noticed that the ad code is cut off in the middle of javascript code in a script tag causing javascript error.

          Code:
          <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
          <td align="center">
          <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
          <!-- FC-cabeçalho-esquerda -->
          <ins class="adsbygoogle"
               style="display:inline-block;width:336px;height:280px"
               google_ad_region= "FC-cabeçalho-esquerda"
               data-ad-client="ca-pub-5786882074340857"
               data-ad-slot="5336794120"></ins>
          [COLOR=#FF0000]<script>
          (adsbygoogle = window.adsbygoogle || []).push([/COLOR]
          
          [I]bunch of HTML tags here...[/I]

          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

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

            #6
            Try enclosing the entire Ad code within <vb:literal> </vb:literal> tags.

            Code:
            <vb:literal>
            
               Ad Code here...
            
            </vb:literal>

            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

            • -=|zami|=-
              Senior Member
              • Feb 2009
              • 190

              #7
              Originally posted by Glenn Vergara
              Try enclosing the entire Ad code within <vb:literal> </vb:literal> tags.

              Code:
              <vb:literal>
              
              Ad Code here...
              
              </vb:literal>

              Perfect !
              working fine since yesterday .

              Thank you so much !

              Comment

              • popowich
                New Member
                • Jun 2004
                • 25
                • 3.8.x

                #8
                Is there a similar fix for vB 3.8.8?
                Talk about New York | Email Help

                Comment


                • Wayne Luke
                  Wayne Luke commented
                  Editing a comment
                  vBulletin 3.8.8 doesn't support the {vb:literal} tag. Please open your thread in the 3.8.X forum for help with your version of vBulletin.

              Related Topics

              Collapse

              Working...