Google analytics in Vbulletin 4 beta 4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trailerswanted
    Senior Member
    • Nov 2005
    • 122
    • 3.7.x

    Google analytics in Vbulletin 4 beta 4

    I try putting my analytics code in the header or footer and get an error message. Where is the best place to paste the google analytics code in the new version now?

    Thanks.
  • zbahadir
    New Member
    • May 2006
    • 11

    #2
    in footer example

    PHP Code:
    <vb:literal>
    <
    script type="text/javascript">
    var 
    gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." "http://www.");
    document.write(unescape("%3Cscript src='" gaJsHost "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </
    script>
    <
    script type="text/javascript">
    try {
    var 
    pageTracker _gat._getTracker("****");
    pageTracker._trackPageview();
    } catch(
    err) {}</script>
    </
    vb:literal
    Last edited by zbahadir; Fri 27 Nov '09, 8:02pm.
    BizimForumlar
    vBulletin4 style not good please improve it

    Comment

    • forexjoker
      Member
      • Nov 2009
      • 36
      • 3.8.x

      #3
      Thanks a lot!!! I checked different forums couple days ago nobody know what to do. LOL
      Latest International News,
      Interviews and Articles,
      Foreign News Translations.

      Comment

      • Removed-836727
        Banned by User Request
        • Apr 2006
        • 1274

        #4
        Don't edit your original template!
        It's better to put the code in to the ad_footer_end template, so there wount be maybe problems on the next update

        Comment

        • Lynne
          Former vBulletin Support
          • Oct 2004
          • 26255

          #5
          ^^ What he said. (Or, there was just a mod released on vb.org to do this for you also.)

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools &lt;- awesome site for html/css help

          Comment

          • wily
            New Member
            • Oct 2009
            • 12

            #6
            So can i just clarify.. would i be adding the PHP code above to the templated called 'footer'.. and down in the code where it says:

            Code:
             
            </div>
            {vb:raw ad_location.ad_footer_end} 
            </div>

            Comment

            • Removed-836727
              Banned by User Request
              • Apr 2006
              • 1274

              #7
              no,=> http://www.vbulletin.com/forum/showt...=1#post1859413

              Comment

              • Num7
                New Member
                • Jul 2009
                • 12

                #8
                Works great, thanks !

                Comment

                • sadiq6210
                  Senior Member
                  • Jun 2004
                  • 379
                  • 3.6.x

                  #9
                  Thanks
                  Signature test :)

                  Comment

                  • sergioloporto
                    Member
                    • Jul 2008
                    • 91
                    • 3.8.x

                    #10
                    Hi, please look at it...

                    Click image for larger version

Name:	ad.JPG
Views:	1
Size:	34.3 KB
ID:	3679512

                    What should I do in this case?? There is no end footer, just start.

                    Thank you
                    Hosting Migliore

                    Comment

                    • anthonyparsons
                      Senior Member
                      • Mar 2005
                      • 2597

                      #11
                      My recommendation is to use the mod Lynne suggested, that way you only need enter your identifier and don't have to edit anything.

                      Comment

                      • sergioloporto
                        Member
                        • Jul 2008
                        • 91
                        • 3.8.x

                        #12
                        Originally posted by Lynne
                        ^^ What he said. (Or, there was just a mod released on vb.org to do this for you also.)
                        Originally posted by anthonyparsons
                        My recommendation is to use the mod Lynne suggested, that way you only need enter your identifier and don't have to edit anything.

                        Hello,

                        I am using that mod, but unfortunately that mod puts the code only on the Forum's header.... but I have also CMS and blogs...

                        I need to put my code "immediately before the closing </head> tag".
                        Where should I put the code (using style manager of course)?
                        Hosting Migliore

                        Comment

                        • anthonyparsons
                          Senior Member
                          • Mar 2005
                          • 2597

                          #13
                          head include bottom

                          Comment

                          • ArchAngelz
                            Member
                            • May 2010
                            • 96

                            #14
                            Do you mean the "headinclude_bottom" template? If so, do we just add the Google Analytics code anywhere in that template? The default headinclude_bottom template already has some code in it.

                            Also, for those of using the vb.org mod which adds the code into the forums, will editing headinclude_bottom to add the code as well result in duplications or conflicts?

                            Thanks!

                            Originally posted by anthonyparsons
                            head include bottom

                            Comment

                            • anthonyparsons
                              Senior Member
                              • Mar 2005
                              • 2597

                              #15
                              You cannot add the code twice. You either use the vb.org mod which will inject the code and only require you to enter your tracking ID via the options, or you insert the code yourself into the above template or where ever it states it should be place. If it is just before the </head>, then the above as the last entry is the correct template.

                              Comment

                              Related Topics

                              Collapse

                              Working...