Google Analytics

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • forexjoker
    Member
    • Nov 2009
    • 36
    • 3.8.x

    #31
    +1 works fine in the footer.
    Latest International News,
    Interviews and Articles,
    Foreign News Translations.

    Comment

    • sunkapoor22
      New Member
      • Nov 2009
      • 18

      #32
      <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("UA-12059730-4");
      pageTracker._trackPageview();
      } catch(err) {}</script>

      I added the above code to the VERY END in the footer template, and I get the following error by vbulletin when I save the file:

      The following error occurred when attempting to evaluate this template:

      Parse error: syntax error, unexpected '[' in /home6/intraspa/public_html/includes/adminfunctions_template.php(4597) : eval()'d code on line 131

      This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
      Should I just ignore this or change what I did? Please advice.

      Thanks!

      Comment

      • Merjawy
        Senior Member
        • Sep 2002
        • 2613

        #33
        I just landed from Mars

        what good does this do for the site if ya'll don't mind?

        EDIT: I went to the site to sign up and come to find out that I already have an account.. must've been years ago lol
        Last edited by Merjawy; Sat 9 Jan '10, 8:38am.
        To be or not to be... Where the hell is the question????
        My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too

        Live vBulletin 4.2.0 Multilingual * Alpha/Beta vB 4 - vB 5 Tier 1A
        CentOS 6.2 - Apache:2.2.15(Apache2Handler) - PHP:5.3.3 - MySQL:5.1.61
        Xampp/Win-XP - Apache v2.2.21(Apache2Handler) - PHP:5.3.8 - MySQL:5.5.16

        Comment

        • s0lidgr0und
          Senior Member
          • May 2007
          • 802
          • 3.6.x

          #34
          Gives stats for your site.
          s.molinari - I would like to ask all customers to definitely feedback issues with the software and be specific with the issues, but to basically suck-up what happened in the past and try to just look forward.

          Comment

          • Trevor Hannant
            vBulletin Support
            • Aug 2002
            • 24358
            • 5.7.X

            #35
            Originally posted by sunkapoor22
            <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("UA-12059730-4");
            pageTracker._trackPageview();
            } catch(err) {}</script>

            I added the above code to the VERY END in the footer template, and I get the following error by vbulletin when I save the file:



            Should I just ignore this or change what I did? Please advice.

            Thanks!
            You should really start your own thread especially as this one's over 3 years old!

            What version of vB are you running exactly?
            Vote for:

            - Admin Settable Paid Subscription Reminder Timeframe (vB6)
            - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

            Comment

            • sunkapoor22
              New Member
              • Nov 2009
              • 18

              #36
              Please see new post and reply here instead:

              Comment

              • Wannakno
                Senior Member
                • Mar 2006
                • 252
                • 3.6.x

                #37
                I get this error when try to put my google analytics code @ top of headinclude or bottom of footer:

                Parse error: syntax error, unexpected '[' in /home/crack/public_html/forums/includes/class_core.php(4007) : eval()'d code on line 6

                Comment

                • Sportsguy
                  New Member
                  • Aug 2009
                  • 3
                  • 3.8.x

                  #38
                  What is the absolute path to the footer template in CMS? I can't find it...

                  Comment

                  • Jorgemen
                    New Member
                    • Feb 2009
                    • 11

                    #39
                    Nice, but now I have other problem, I guess is a problem: I added the google analytics in footer template, but I have lines of code over </body> I guess this is a problem for google analytics, I do not how delete that,

                    Please help me....

                    Code:
                    ____________________________________________________________
                    <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("UA-5885100-3");
                    pageTracker._trackPageview();
                    } catch(err) {}</script>

                    <script type="text/javascript"><!--

                    window.orig_onload = window.onload;
                    window.onload = function() {
                    if (is_ie || is_moz) { var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj.scrollIntoView(true); }}

                    if(typeof window.orig_onload == "function") window.orig_onload();
                    }

                    //-->
                    </script>
                    </body>
                    </html>
                    ____________________________________________________________

                    Comment

                    • flegul
                      New Member
                      • Jan 2010
                      • 19
                      • 3.8.x

                      #40
                      Adding Analytics to vBulletin 4.0
                      • Log in to your VB admin control panal
                      • Choose Styles & Templates from the left menu
                      • Click Styles Manager
                      • Select the drop down menu for your active style and choose Edit Templates under Template Options. (second listing down)
                      • The page will change but just hit GO next to the dropdown.
                      • 3 boxes of code appear, the third is the Footer
                      • Scroll all the way down to the end of the code in the box, and put your cursor in the box ready.
                      • Type <vb:literal>
                      • Paste your Google Analytics Code
                      • Type </vb:literal>
                      • Scroll to the bottom of the page and hit Save!

                      Why the <vb:literal>? Its because VB uses a bastardised version of the smarty engine. Without those tags the engine freaks out when interpreting javascript and other codes.


                      Taken from



                      Works fine for me .


                      Comment

                      • Trevor Hannant
                        vBulletin Support
                        • Aug 2002
                        • 24358
                        • 5.7.X

                        #41
                        Originally posted by flegul
                        Adding Analytics to vBulletin 4.0

                        • Log in to your VB admin control panal
                        • Choose Styles & Templates from the left menu
                        • Click Styles Manager
                        • Select the drop down menu for your active style and choose Edit Templates under Template Options. (second listing down)
                        • The page will change but just hit GO next to the dropdown.
                        • 3 boxes of code appear, the third is the Footer
                        • Scroll all the way down to the end of the code in the box, and put your cursor in the box ready.
                        • Type <vb:literal>
                        • Paste your Google Analytics Code
                        • Type </vb:literal>
                        • Scroll to the bottom of the page and hit Save!


                        Why the <vb:literal>? Its because VB uses a bastardised version of the smarty engine. Without those tags the engine freaks out when interpreting javascript and other codes.


                        Taken from



                        Works fine for me .


                        This is the 3.6 orum - your solution is for vB4...
                        Vote for:

                        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
                        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

                        Comment

                        • GRE
                          Member
                          • Nov 2009
                          • 87
                          • 4.1.x

                          #42
                          And be sure when -and if- you change the default style, to copy the code and paste it to the new footer template! I forgot it and now some days appear with no visitors!
                          Check my site and don't worry if it's all Greek to you
                          It's all Greek to everybody

                          Comment

                          • John Miller
                            Senior Member
                            • May 2005
                            • 191
                            • 3.5.x

                            #43
                            Originally posted by GRE
                            And be sure when -and if- you change the default style, to copy the code and paste it to the new footer template! I forgot it and now some days appear with no visitors!
                            Hi Gree,

                            The same thing is happening with my google analytics account, I can see no visitor from past 1 month. How I can change it any idea ? It's showing me complete blank in my Analytics acccount. What should I do ? Help me..

                            Regards
                            IndiaGarage

                            Comment

                            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                            Working...